<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>


    <title>智慧车驾管</title>
    <link rel="stylesheet" href="css/main.css">
    <script src="js/vue.min.js"></script>
    <script src="js/signature_pad.js"></script>
    <script src="js/jquery-1.11.2.min.js"></script>
    <script src="layer/layui.all.js"></script>
    <link rel="stylesheet" href="layer/css/layui.css">
    <script src="js/options.js"></script>
    <script src="js/xzqh.js"></script>
    <script src="js/html2canvas.js"></script>
    <style>


        #app {
            width: 1300px;

        }

        #left_area {
            width: 390px;
            float: left;
            margin-left: 10px;
        }

        #button_area {
            width: 60px;
            float: left;
        }

        #left_area_div {
            overflow-y: scroll;
        }

        #left_area_div::-webkit-scrollbar {
            display: none;
        }

        #table_div1 {
            overflow-y: scroll;
        }

        #table_div2::-webkit-scrollbar {
            display: none;
        }

        #table_div2 {
            overflow-y: scroll;
        }

        #table_div3::-webkit-scrollbar {
            display: none;
        }

        #table_div3 {
            overflow-y: scroll;
        }

        #table_div1::-webkit-scrollbar {
            display: none;
        }

        .info_name {
            display: inline-block;
            width: 100px;
            text-align: right;
            vertical-align: text-top;
        }

        .info_value {
            display: inline-block;
            width: 210px;
            text-align: left;
            vertical-align: text-top;
        }

        #main_area {
            width: 780px;
            float: left;
            margin-left: 10px;
        }

        .layui-form-label {
            width: 100px;
        }

        #dlr_div {
            /*transform: scale(0.8, 0.8);*/
            /*-ms-transform: scale(0.8, 0.8); !* IE 9 *!*/
            /*-moz-transform: scale(0.8, 0.8); !* Firefox *!*/
            /*-webkit-transform: scale(0.8, 0.8); !* Safari 和 Chrome *!*/
            /*-o-transform: scale(0.8, 0.8);*/
            /*border: 1px solid red;*/
            /*margin: -25px -95px;*/
        }

        #sqr_div {
            /*transform: scale(0.8, 0.8);*/
            /*-ms-transform: scale(0.8, 0.8); !* IE 9 *!*/
            /*-moz-transform: scale(0.8, 0.8); !* Firefox *!*/
            /*-webkit-transform: scale(0.8, 0.8); !* Safari 和 Chrome *!*/
            /*-o-transform: scale(0.8, 0.8);*/
            /*border: 1px solid red;*/
            /*margin: -25px -95px;*/
        }

        #pic1, #pic3 {
            position: absolute;
            background-image: url("images/id_front.png");
            background-size: cover;
            background-repeat: no-repeat;
            height: 192px;
            width: 308px;
            left: 8px;
            top: 8px;
        }

        #pic1 div {
            /*background-color: red;*/
            position: absolute;

            /*filter: alpha(opacity=50); !*支持 IE 浏览器*!*/
            /*-moz-opacity: 0.5; !*支持 FireFox 浏览器*!*/
            /*opacity: 0.5;*/
        }

        #pic3 div {
            /*background-color: red;*/
            position: absolute;

            /*filter: alpha(opacity=50); !*支持 IE 浏览器*!*/
            /*-moz-opacity: 0.5; !*支持 FireFox 浏览器*!*/
            /*opacity: 0.5;*/
        }

        #pic2, #pic4 {
            position: absolute;
            background-image: url("images/id_behind.png");
            background-size: cover;
            background-repeat: no-repeat;
            height: 192px;
            width: 308px;
            left: 322px;
            top: 8px;
        }

        #pic2 div {
            /*background-color: red;*/
            position: absolute;
            /*filter: alpha(opacity=50); !*支持 IE 浏览器*!*/
            /*-moz-opacity: 0.5; !*支持 FireFox 浏览器*!*/
            /*opacity: 0.5;*/
        }

        #pic4 div {
            /*background-color: red;*/
            position: absolute;

            /*filter: alpha(opacity=50); !*支持 IE 浏览器*!*/
            /*-moz-opacity: 0.5; !*支持 FireFox 浏览器*!*/
            /*opacity: 0.5;*/
        }

        #live1 {
            position: absolute;
            background-size: cover;
            background-repeat: no-repeat;
            height: 192px;
            width: 143px;
            left: 628px;
            top: 8px;
            cursor: pointer;

        }

        #live2 {
            position: absolute;
            background-size: cover;
            background-repeat: no-repeat;
            height: 192px;
            width: 143px;
            left: 628px;
            top: 8px;
            cursor: pointer;
        }

        .name {
            left: 56px;
            top: 24px;
            height: 18px;
            width: 55px;
            font-size: 13px;
        }

        .sex {
            left: 56px;
            top: 48px;
            height: 14px;
            width: 14px;
            font-size: 11px;
        }

        .nation {
            left: 118px;
            top: 48px;
            height: 14px;
            width: 14px;
            font-size: 11px;
        }

        .year {
            left: 56px;
            top: 74px;
            height: 12px;
            width: 32px;
            font-size: 12px;
        }

        .month {
            left: 102px;
            top: 74px;
            height: 12px;
            width: 12px;
            font-size: 12px;
        }

        .day {
            left: 132px;
            top: 74px;
            height: 12px;
            width: 14px;
            font-size: 12px;
        }

        .address {
            left: 56px;
            top: 97px;
            height: 38px;
            width: 135px;
            font-size: 12px;
        }

        .photo {
            left: 190px;
            top: 24px;
            height: 112px;
            width: 96px;
        }

        .idNumber {
            left: 104px;
            top: 158px;
            height: 16px;
            width: 210px;
            font-size: 14px;
            letter-spacing: 2px;
        }

        .office {
            left: 120px;
            top: 138px;
            height: 16px;
            width: 210px;
            font-size: 12px;
            transform: scale(0.9,0.9);

        }

        .date {
            left: 120px;
            top: 166px;
            height: 14px;
            width: 210px;
            font-size: 12px;
            transform: scale(0.9,0.9);
        }

        .page_btn {
            float: left;
            height: 80px;
            width: 120px;
            border: 1px solid #2881FB;
            color: #2881FB;
            font-size: 18px;
            margin: 20px 0 0 20px;
            text-align: center;
            vertical-align: center;
            padding-top: 36px;
        }

        .page_btn:hover {
            background-color: #2881FB;
            color: white;
            cursor: pointer;
        }

        .page_btn_current {
            background-color: #2881FB;
            color: white;
        }

        legend.fold {
            cursor: pointer;
            background-image: url('images/unfold.png');
            padding-right: 25px;
            background-size: 28px 28px;
            background-position: 108px 0px;
            background-repeat: no-repeat;
        }

        legend.unfold {

            cursor: pointer;
            background-image: url('images/fold.png');
            padding-right: 25px;
            background-size: 28px 28px;
            background-position: 108px 0px;
            background-repeat: no-repeat;
        }

        .scan_btn_checked {

            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/scan_w.png");
            background-color: #2881FB;
            color: white;
            cursor: pointer;
            flex: 1
        }

        .scan_btn_unchecked {

            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/scan_b.png");
            cursor: pointer;
            color: #2881FB;
            flex: 1
        }

        .cam_btn_checked {

            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/cam_w.png");
            background-color: #2881FB;
            color: white;

            cursor: pointer;
            flex: 1
        }

        .cam_btn_unchecked {
            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/cam_b.png");
            cursor: pointer;
            color: #2881FB;

            flex: 1
        }

        .card_btn_checked {

            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/card_w.png");
            background-color: #2881FB;
            color: white;

            cursor: pointer;
            flex: 1
        }

        .card_btn_unchecked {
            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/card_b.png");
            cursor: pointer;
            color: #2881FB;
            flex: 1
        }

        .setting_btn_unchecked {
            line-height: 45px;
            text-indent: 30px;
            background-position: 35px center;
            background-size: 30px 30px;
            background-repeat: no-repeat;
            background-image: url("images/setting_b.png");
            cursor: pointer;
            color: #2881FB;
            flex: 1
        }


    </style>


</head>
<body>

<div id="app">

    <fieldset id="left_area" class="layui-elem-field" style="margin-top: 5px;border-color: #2881FB;">
        <legend style="color:#2881FB;">基本信息</legend>
        <div class="layui-field-box" id="left_area_div">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 5px;padding-top:10px;"
                      v-if="form.manInfo||form.newManInfo">
                <legend style="font-size: 16px">驾驶人信息</legend>
                <blockquote :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.manInfo.sfzmhm}]"
                            v-on:click="selectInfo(form.manInfo)"
                            style="cursor: pointer" v-if="form.manInfo!=null">

                    <div class="info_name">姓名:</div>
                    <div class="info_value">{{form.manInfo.xm}}</div>
                    <div class="info_name">驾驶证状态:</div>
                    <div class="info_value" :style="{color:form.manInfo.zt!='A'?'red':'#000000'}">
                        {{form.manInfo.ztmc}}
                    </div>
                    <div class="info_name">身份证号:</div>
                    <div class="info_value">{{form.manInfo.sfzmhm}}</div>
                    <div class="info_name">性别:</div>
                    <div class="info_value">{{form.manInfo.xbmc}}</div>
                    <div class="info_name">出生日期:</div>
                    <div class="info_value">{{form.manInfo.csrq}}</div>
                    <div class="info_name">签发机关:</div>
                    <div class="info_value">{{form.manInfo.fzjg}}</div>
                    <div class="info_name">累计积分:</div>
                    <div class="info_value">{{form.manInfo.ljjf}}</div>
                    <div class="info_name">准驾车型:</div>
                    <div class="info_value">{{form.manInfo.zjcx}}</div>
                    <div class="info_name">手机号码:</div>
                    <div class="info_value">{{form.manInfo.sjhm}}</div>
                    <div class="info_name">住址:</div>
                    <div class="info_value">{{form.manInfo.lxzsxxdz}}</div>
                    <div class="info_name">驾驶证有效期:</div>
                    <div class="info_value">{{form.manInfo.yxq}}</div>
                    <div class="info_name">初次领证日期:</div>
                    <div class="info_value">{{form.manInfo.cclzrq}}</div>
                </blockquote>
                <blockquote v-if="form.newManInfo!=null" :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.newManInfo.value}]"
                            v-on:click="selectInfo(form.newManInfo)"
                            style="cursor: pointer">
                    <div class="info_name">驾驶证:</div>
                    <div class="info_value">初次申领</div>
                </blockquote>
                <blockquote v-if="form.transferInManInfo!=null"
                            :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.transferInManInfo.value}]"
                            v-on:click="selectInfo(form.transferInManInfo)"
                            style="cursor: pointer">
                    <div class="info_name">驾驶证:</div>
                    <div class="info_value">转入换证</div>
                </blockquote>
                <blockquote v-if="form.transferInManInfo2!=null"
                            :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.transferInManInfo2.value}]"
                            v-on:click="selectInfo(form.transferInManInfo2)"
                            style="cursor: pointer">
                    <div class="info_name">驾驶证:</div>
                    <div class="info_value">遗失补证(外地)</div>
                </blockquote>
            </fieldset>
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 5px;padding-top:10px;"
                      v-if="form.manInfo||form.newManInfo">
                <legend style="font-size: 16px">机动车信息</legend>
                <blockquote v-for="carInfo in form.carInfoList"
                            :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=carInfo.hphm}]"
                            style="cursor: pointer;" v-on:click="selectInfo(carInfo)">
                    <div class="info_name">车辆号牌:</div>
                    <div class="info_value">鲁{{carInfo.hphm}}</div>
                    <div class="info_name">车辆状态:</div>
                    <div class="info_value" :style="{color:carInfo.zt!='A'?'red':'#000000'}">{{carInfo.ztmc}}</div>
                    <div class="info_name">车辆识别代码:</div>
                    <div class="info_value">{{carInfo.clsbdh}}</div>
                    <div class="info_name">号牌种类:</div>
                    <div class="info_value">{{carInfo.hpzlmc}}</div>
                    <div class="info_name">发证机关:</div>
                    <div class="info_value">{{carInfo.fzjg}}</div>
                    <div class="info_name">发动机号:</div>
                    <div class="info_value">{{carInfo.fdjh}}</div>
                    <div class="info_name">车辆类型:</div>
                    <div class="info_value">{{carInfo.cllxmc}}</div>
                    <div class="info_name">车辆品牌:</div>
                    <div class="info_value">{{carInfo.clpp1}}</div>
                    <div class="info_name">车辆型号:</div>
                    <div class="info_value">{{carInfo.clxh}}</div>
                    <div class="info_name">车身颜色:</div>
                    <div class="info_value">{{carInfo.csysmc}}</div>
                    <div class="info_name">车辆来源:</div>
                    <div class="info_value">{{carInfo.cllymc}}</div>
                    <div class="info_name">抵押状态:</div>
                    <div class="info_value">{{carInfo.dybjmc}}</div>
                    <div class="info_name">环保达标情况:</div>
                    <div class="info_value">{{carInfo.hbdbqk}}</div>
                    <div class="info_name">检验合格标志:</div>
                    <div class="info_value">{{carInfo.jyhgbzbh}}</div>
                    <div class="info_name">最近检测日期:</div>
                    <div class="info_value">{{carInfo.djrq}}</div>
                    <div class="info_name">保险到期日期:</div>
                    <div class="info_value">{{carInfo.bxzzrq}}</div>
                    <div class="info_name">是否新能源:</div>
                    <div class="info_value">{{carInfo.eFlagLabel}}</div>
                </blockquote>

                <blockquote v-if="form.newCarInfo!=null" :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.newCarInfo.value}]"
                            v-on:click="selectInfo(form.newCarInfo)"
                            style="cursor: pointer">
                    <div class="info_name">机动车:</div>
                    <div class="info_value">注册登记</div>
                </blockquote>
                <blockquote v-if="form.transferCarInfo!=null" :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.transferCarInfo.value}]"
                            v-on:click="selectInfo(form.transferCarInfo)"
                            style="cursor: pointer">
                    <div class="info_name">机动车:</div>
                    <div class="info_value">车辆转入</div>
                </blockquote>
                <blockquote :class="['layui-elem-quote',{'layui-quote-nm':form.currentInfoVal!=form.outerCarInfo.value}]"
                            v-on:click="selectInfo(form.outerCarInfo)"
                            style="cursor: pointer">
                    <div class="info_name">机动车:</div>
                    <div class="info_value">6年免检(外地)</div>
                </blockquote>
            </fieldset>
        </div>
    </fieldset>

    <div id="main_area">
        <fieldset class="layui-elem-field" style="margin-top: 5px;border-color: #2881FB;" id="idDiv">
            <legend style="color:#2881FB;" :class="[{'fold':idFoldFlag},{'unfold':!idFoldFlag}]"
                    onclick="foldIdDiv()">办理人信息
            </legend>
            <div class="layui-field-box" id="sqr_div" style="position: relative;height: 190px;" v-if="sqr!=null&&sqr.xm!=null">
                <div id="pic3">
                    <div class="name">{{person.xm}}</div>
                    <div class="sex">{{person.xb}}</div>
                    <div class="nation">{{person.mz}}</div>
                    <div class="year">{{person.year}}</div>
                    <div class="month">{{person.month}}</div>
                    <div class="day">{{person.day}}</div>
                    <div class="address">{{person.address}}</div>
                    <div class="photo" style="text-align: center"><img :src="['data:image/png;base64,'+sqr.zp]" height="100%"/></div>
                    <div class="idNumber">{{person.sfzmhm}}</div>
                </div>
                <div id="pic4">
                    <div class="office">{{person.qfjg}}</div>
                    <div class="date">{{person.zjyxq}}</div>
                </div>
                <div id="live1" v-if="xcrx" v-on:click="passSqrMatch">
                    <span style="display: inline-block; width: 100%;text-align: center;font-size: 15px;color: #2881FB;margin: 5px 0 0 0;">现场人像</span>
                    <img :src="xcrx" style="width: 120px;margin: 8px"/>
                    <span style="display: inline-block; width: 100%;text-align: center;font-size: 13px;"><img
                            :src="sqrMatchIcon" width="16" style="margin-bottom: 6px;"/>{{sqrMatchTips}}</span>
                </div>
            </div>
            <div class="layui-field-box" id="dlr_div" style="position: relative;height: 190px;" v-if="dlr!=null&&dlr.xm!=null">
                <div id="pic1">
                    <div class="name">{{dlr.xm}}</div>
                    <div class="sex">{{dlr.xb}}</div>
                    <div class="nation">{{dlr.mz}}</div>
                    <div class="year">{{dlr.year}}</div>
                    <div class="month">{{dlr.month}}</div>
                    <div class="day">{{dlr.day}}</div>
                    <div class="address">{{dlr.address}}</div>
                    <div class="photo" style="text-align: center"><img :src="['data:image/png;base64,'+dlr.zp]" height="100%"/></div>
                    <div class="idNumber">{{dlr.sfzmhm}}</div>
                </div>
                <div id="pic2">
                    <div class="office">{{dlr.qfjg}}</div>
                    <div class="date">{{dlr.zjyxq}}</div>
                </div>
                <div id="live2" v-if="xcrx2" v-on:click="passDlrMatch">
                    <span style="display: inline-block; width: 100%;text-align: center;font-size: 15px;color: #2881FB;margin: 5px 0 0 0;">现场人像</span>
                    <img :src="xcrx2" style="width: 120px;margin: 10px"/>
                    <span style="display: inline-block; width: 100%;text-align: center;font-size: 13px;"><img
                            :src="dlrMatchIcon" width="16" style="margin-bottom: 6px;"/>{{dlrMatchTips}}</span>
                </div>
            </div>


            <div class="layui-field-box" style="position: relative;height: 190px;" v-if="person==null" id="null_div">
            </div>
        </fieldset>
        <fieldset class="layui-elem-field" style="margin-top: 5px;border-color: #2881FB;">
            <legend style="color:#2881FB;">{{ywdlmc}}</legend>
            <div class="layui-field-box" id="table_div1" :style="{display:form.currentInfo.type=='man'||form.currentInfo.type=='newMan'?'block':'none'}">

                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend style="font-size: 16px">基本信息</legend>
                </fieldset>
                <div class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.xm" id="xm1" class="layui-input" disabled/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">性别</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.xb" id="xb1" class="layui-input"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">出生日期</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.csrq" class="layui-input" id="csrq1"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">国籍</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.gj" class="layui-input"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明名称1</label>

                            <div class="layui-input-inline">
                                <select lay-filter="sfzmmc1" disabled>
                                    <option value="">请选择身份证明名称</option>
                                    <option value="居民身份证" selected="">居民身份证</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明号码1</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.sfzmhm1" class="layui-input" disabled/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明名称2</label>

                            <div class="layui-input-inline">
                                <select lay-filter="sfzmmc2">
                                    <option value="">请选择身份证明名称</option>
                                    <option value="居民身份证">居民身份证</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明号码2</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table1.sfzmhm2" class="layui-input"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">登记住所区划</label>



                        <div class="layui-input-inline" style="width: 171px;">
                            <select v-model="form.table1.xzqhSheng" lay-filter="xzqhSheng" id="xzqhSheng">
                                <option value="">请选择省(自治区、直辖市)</option>
                                <option v-bind:value="option.key" v-for="option in shengOptions">{{option.value}}</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 171px;">
                            <select v-model="form.table1.xzqhShi" lay-filter="xzqhShi" id="xzqhShi">
                                <option value="">请选择市(地、州)</option>
                                <option v-bind:value="option.key" v-for="option in xzqhShiOptions">{{option.value}}</option>
                            </select>
                        </div>

                        <div class="layui-input-inline" style="width: 172px;">
                            <select v-model="form.table1.djzsxzqh" lay-filter=djzsxzqh" id="djzsxzqh" >
                                <option value="">请选择区(县)</option>
                                <option v-bind:value="option.key" v-for="option in djzsxzqhOptions">{{option.value}}</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">登记住所地址</label>
                        <div class="layui-input-block">
                            <input style="width: 534px;" type="text" v-model="form.table1.djzsxxdz" class="layui-input" />
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">联系住所区划</label>

                        <div class="layui-input-inline" style="width: 172px;">
                            <select v-model="form.table1.lxzsxzqh" lay-filter="xzqhQu" id="xzqhQu">
                                <option value="">请选择行政区划</option>
                                <option v-bind:value="option.key" v-for="option in lxzsxzqhOptions">{{option.value}}</option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">联系住所地址</label>
                        <div class="layui-input-block">
                            <input style="width: 534px;" type="text" v-model="form.table1.yjdz" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">固定电话</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table1.gddh" class="layui-input"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">电子邮箱</label>
                            <div class="layui-input-inline">
                                <input type="email" v-model="form.table1.dzyx" class="layui-input"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号码</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table1.sjhm" class="layui-input"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">邮政编码</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table1.yzbm" class="layui-input"/>
                            </div>
                        </div>
                    </div>


                </div>
                <div>
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend style="font-size: 16px">业务信息</legend>

                    </fieldset>
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">业务类型</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table1.ywlx1" lay-filter="ywlx1" id="ywlx1">
                                        <option value="">请选择业务类型</option>
                                        <option v-bind:value="option.key" v-for="option in ywlxOptions">{{option.jkbz?'★':''}} {{option.value}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <div class="layui-inline"
                                 :style="{display:((form.table1.ywlx1>=1&&form.table1.ywlx1<=4)||(form.table1.ywlx1>=8&&form.table1.ywlx1<=10)||form.table1.ywlx1==17||form.table1.ywlx1==31||form.table1.ywlx1==21)?'inline-block':'none'}">
                                <label class="layui-form-label">申请准驾车型</label>
                                <div class="layui-input-inline">

                                    <input type="text" v-model="form.table1.zjcx1" class="layui-input"/>

                                </div>
                            </div>
                            <div class="layui-inline"
                                 :style="{display:(form.table1.ywlx1>=1&&form.table1.ywlx1<=4)||form.table1.ywlx1==21?'inline-block':'none'}">
                                <label class="layui-form-label">渠道/来源</label>
                                <div class="layui-input-inline">
                                    <select lay-filter="qdly1" v-model="form.table1.qdly1">
                                        <option value="">请选择渠道来源</option>
                                        <option :value="option.key" v-for="option in qdlyOptions1">{{option.value}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline"
                                 :style="{display:((form.table1.ywlx1>=13&&form.table1.ywlx1<=15)||form.table1.ywlx1==32)?'inline-block':'none'}">
                                <label class="layui-form-label">原因</label>

                                <div class="layui-input-inline">
                                    <select lay-filter="yy1" v-model="form.table1.yy1">
                                        <option value="">请选择原因</option>
                                        <option :value="option.key" v-for="option in yyOptions1">{{option.value}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item"
                             :style="{display:form.table1.ywlx1==11?'inline-block':'none'}">

                            <div class="layui-inline">
                                <label class="layui-form-label">变更事项</label>
                                <div class="layui-input-inline">
                                    <select lay-filter="bgsx1" v-model="form.table1.bgsx1">
                                        <option value="">请选择变更事项</option>
                                        <option value="姓名">姓名</option>
                                        <option value="身份证明号码">身份证明号码</option>
                                        <option value="性别">性别</option>
                                        <option value="地址">地址</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">变更内容</label>
                                <div class="layui-input-inline">
                                    <input v-model="form.table1.bgnr1" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item"
                             :style="{display:form.table1.ywlx1==11?'inline-block':'none'}">

                            <div class="layui-inline">
                                <label class="layui-form-label">变更事项</label>
                                <div class="layui-input-inline">
                                    <select lay-filter="bgsx2" v-model="form.table1.bsgx2">
                                        <option value="">请选择变更事项</option>
                                        <option value="姓名">姓名</option>
                                        <option value="身份证明号码">身份证明号码</option>
                                        <option value="性别">性别</option>
                                        <option value="地址">地址</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">变更内容</label>
                                <div class="layui-input-inline">
                                    <input v-model="form.table1.bgnr2" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item"
                             :style="{display:form.table1.ywlx1==12?'block':'none'}">

                            <label class="layui-form-label">从业单位</label>
                            <div class="layui-input-block">
                                <input style="width: 534px;" v-model="form.table1.cydw1" class="layui-input"/>
                            </div>
                        </div>
                    </div>
                </div>


                <div v-if="form.table1.dlrDisplay">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend style="font-size: 16px">监护人/代理人信息</legend>
                    </fieldset>

                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label">代理人姓名</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" disabled v-model="form.table1.dlrxm"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">联系电话</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" v-model="form.table1.dlrlxdh"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明名称</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" value="居民身份证" disabled/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">身份证明号码</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" v-model="form.table1.dlrsfzmhm" disabled/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">联系地址</label>
                        <div class="layui-input-block">
                            <input style="width: 534px;" type="text" v-model="form.table1.dlrlxdz" class="layui-input">
                        </div>
                    </div>
                </div>


                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend style="font-size: 16px">用户签名</legend>

                    <div class="layui-form" style="text-align: center">
                        <br/>

                        <img width="400" height="190" :src="signSrc"
                             style="background-color: #eeeeee;border-radius: 15px;"/>
                        <br/>
                        <br/>
                        <br/>

                        <button
                                :class="['layui-btn',{'layui-btn-normal':form.showSignPad},{'layui-btn-primary':!form.showSignPad}]"
                                v-on:click="showSignPad">{{signPadBtnName}}
                        </button>
                        <button
                                :class="['layui-btn',{'layui-btn-normal':form.table1.showTable},{'layui-btn-primary':!form.table1.showTable}]"
                                v-on:click="showTable1">{{tableBtnName}}
                        </button>
                        <button class="layui-btn layui-btn-normal" :style="{display:form.table1.ywlx1=='5'||form.table1.ywlx1=='7'||form.table1.ywlx1=='13'?'inline-block':'none'}" onclick="showManSubmit(true);">保存申请(变更)</button>
                        <button class="layui-btn layui-btn-normal" onclick="showManSubmit(false);">保存申请</button>
                        <button class="layui-btn layui-btn-normal" onclick="showClipboard();">手工录入</button>
                    </div>

                </fieldset>
            </div>

            <div class="layui-field-box" id="table_div2"
                 :style="{display:form.currentInfo.type=='car'||form.currentInfo.type=='newCar'||form.currentInfo.type=='transferIn'||form.currentInfo.type=='outerCar'?'block':'none'}">

                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend style="font-size: 16px">机动车所有人</legend>
                </fieldset>
                <div class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">姓名</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.xm" id="xm2" class="layui-input" disabled/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">邮政编码</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table2.yzbm" class="layui-input"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">邮寄地址</label>
                        <div class="layui-input-block">
                            <input style="width: 534px;" type="text" v-model="form.table2.yjdz" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号码</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table2.sjhm" class="layui-input"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">固定电话</label>
                            <div class="layui-input-inline">
                                <input type="number" v-model="form.table2.gddh" class="layui-input"/>
                            </div>
                        </div>

                    </div>
                </div>

                <div v-if="form.table2.dlrDisplay">
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend style="font-size: 16px">代理人信息</legend>
                    </fieldset>
                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label">姓名/名称</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" disabled v-model="form.table2.dlrxm"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">手机号码</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" v-model="form.table2.dlrlxdh"/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">联系地址</label>
                        <div class="layui-input-block">
                            <input style="width: 534px;" type="text" v-model="form.table2.dlrlxdz" class="layui-input">
                        </div>
                    </div>
                </div>


                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend style="font-size: 16px">机动车信息</legend>
                </fieldset>
                <div class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">号牌种类</label>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.hpzl" lay-filter="hpzl" id="hpzl">
                                    <option value="">请选择号牌种类</option>
                                    <option v-bind:value="option.key" v-for="option in hpzlOptions">{{option.value}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">号牌号码</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.hphm" class="layui-input" id="hphm"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">品牌型号</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.ppxh" class="layui-input" id="ppxh"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">车辆识别代号</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.clsbdh" class="layui-input" id="clsbdh"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">保险生效日期</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.bxsxrq" class="layui-input" id="bxsxrq"/>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">保险终止日期</label>
                            <div class="layui-input-inline">
                                <input type="text" v-model="form.table2.bxzzrq" class="layui-input" id="bxzzrq"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">使用性质</label>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.syxz" lay-filter="syxz" id="syxz">
                                    <option value="">请选择使用性质</option>
                                    <option v-bind:value="option.key" v-for="option in syxzOptions">{{option.value}}</option>
                                </select>
                            </div>
                        </div>

                    </div>
                </div>


                <div>
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend style="font-size: 16px">申请业务事项</legend>
                    </fieldset>
                    <div class="layui-form">
                        <div class="layui-form-item">

                            <div class="layui-inline">
                                <label class="layui-form-label">业务大类</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.ywdl1" lay-filter="jdcYwdl1" id="jdcYwdl1">
                                        <option value="">请选择业务大类</option>
                                        <option v-bind:value="option.key" v-for="option in jdcYwdlOptions">{{option.jkbz?'★':''}} {{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline" v-if="form.table2.ywdl1=='2'||form.table2.ywdl1=='4'">
                                <label class="layui-form-label">业务类型</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.ywlx1" lay-filter="jdcYwlx1" id="jdcYwlx1">
                                        <option value="">请选择业务类型</option>
                                        <option v-bind:value="option.key" v-for="option in jdcYwlxOptions">{{option.jkbz?'★':''}} {{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item" :style="{display:form.table2.ywlx1==205?'block':'none'}">
                            <label class="layui-form-label">转出至</label>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.sheng" lay-filter="sheng" id="sheng">
                                    <option value="">请选择省(自治区、直辖市)</option>
                                    <option v-bind:value="option.key" v-for="option in shengOptions">{{option.value}}</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.shi" lay-filter="shi" id="shi">
                                    <option value="">请选择市(地、州)</option>
                                    <option v-bind:value="option.key" v-for="option in shiOptions">{{option.value}}</option>
                                </select>
                            </div>
                        </div>


                        <div class="layui-form-item" v-if="form.table2.ywdl1=='1'">

                            <div class="layui-inline">
                                <label class="layui-form-label">业务类型</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.ywlx1" lay-filter="jdcYwlx1">
                                        <option value="">请选择业务类型</option>
                                        <option v-bind:value="option.key" v-for="option in jdcYwlxOptions">{{option.jkbz?'★':''}} {{option.value}}</option>
                                    </select>
                                </div>
                            </div>


                            <div class="layui-inline"
                                 :style="{display:((form.table2.ywlx1>=2&&form.table2.ywlx1<=4)||form.table2.ywlx1==7||form.table2.ywlx1==9||form.table2.ywlx1==10)?'inline-block':'none'}">
                                <label class="layui-form-label">原因/明细</label>

                                <div class="layui-input-inline">
                                    <select lay-filter="jdcMxyy1" v-model="form.table2.mxyy1">
                                        <option value="">请选择原因/明细</option>
                                        <option :value="option.key" v-for="option in jdcMxyyOptions">{{option.value}}
                                        </option>
                                    </select>
                                </div>
                            </div>

                            <div class="layui-inline"
                                 :style="{display:(form.table2.ywlx1==16)?'inline-block':'none'}">
                                <label class="layui-form-label">互换后号牌号码</label>
                                <div class="layui-input-inline">

                                    <input type="text" v-model="form.table2.xhphm" class="layui-input"/>

                                </div>
                            </div>

                        </div>


                        <div class="layui-form-item" v-if="form.table2.ywdl1=='3'">
                            <div class="layui-inline">

                                <label class="layui-form-label">变更事项1</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.bgsx1" lay-filter="jdcBgsx1">
                                        <option value="">请选择变更事项</option>
                                        <option v-bind:value="option.key" v-for="option in bgsxOptions1">{{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline" v-if="(form.table2.bgsx1>0&&form.table2.bgsx1<=3)||form.table2.bgsx1>=7">
                                <label class="layui-form-label">变更后</label>
                                <div class="layui-input-inline">
                                    <input type="text" v-model="form.table2.bgnr1" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline" v-if="form.table2.bgsx1==6">
                                <label class="layui-form-label">变更后</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.bgsyxz1" lay-filter="bgsyxz1">
                                        <option value="">请选择使用性质</option>
                                        <option v-bind:value="option.key" v-for="option in syxzOptions">{{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item" v-if="form.table2.bgsx1==4">
                            <div class="layui-inline">
                                <label class="layui-form-label">邮寄地址</label>
                                <div class="layui-input-inline">
                                    <input type="text" v-model="form.table2.bgyjdz1" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">手机号码</label>
                                <div class="layui-input-inline">
                                    <input type="text" v-model="form.table2.bgsjhm1" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" v-if="form.table2.bgsx1==4">
                            <div class="layui-inline">
                                <label class="layui-form-label">邮政编码</label>
                                <div class="layui-input-inline">
                                    <input type="text" v-model="form.table2.bgyzbm1" class="layui-input"/>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">固定电话</label>
                                <div class="layui-input-inline">
                                    <input type="text" v-model="form.table2.bggddh1" class="layui-input"/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" v-if="form.table2.bgsx1==5">
                            <label class="layui-form-label">转入至</label>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.zrsheng1" lay-filter="zrsheng1" id="zrsheng1">
                                    <option value="">请选择省(自治区、直辖市)</option>
                                    <option v-bind:value="option.key" v-for="option in shengOptions">{{option.value}}</option>
                                </select>
                            </div>
                            <div class="layui-input-inline">
                                <select v-model="form.table2.zrshi1" lay-filter="zrshi1" id="zrshi1">
                                    <option value="">请选择市(地、州)</option>
                                    <option v-bind:value="option.key" v-for="option in zrshiOptions1">{{option.value}}</option>
                                </select>
                            </div>
                        </div>


                        <div v-if="form.table2.bgsx1">
                            <div class="layui-form-item">
                                <div class="layui-inline">

                                    <label class="layui-form-label">变更事项2</label>
                                    <div class="layui-input-inline">
                                        <select v-model="form.table2.bgsx2" lay-filter="jdcBgsx2">
                                            <option value="">请选择变更事项</option>
                                            <option v-bind:value="option.key" v-for="option in bgsxOptions2">{{option.value}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline" v-if="(form.table2.bgsx2>0&&form.table2.bgsx2<=3)||form.table2.bgsx2>=7">
                                    <label class="layui-form-label">变更后</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgnr2" class="layui-input"/>
                                    </div>
                                </div>

                                <div class="layui-inline" v-if="form.table2.bgsx2==6">
                                    <label class="layui-form-label">变更后</label>
                                    <div class="layui-input-inline">
                                        <select v-model="form.table2.bgsyxz1" lay-filter="bgsyxz1">
                                            <option value="">请选择使用性质</option>
                                            <option v-bind:value="option.key" v-for="option in syxzOptions">{{option.value}}</option>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item" v-if="form.table2.bgsx2==4">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮寄地址</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgyjdz1" class="layui-input"/>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">手机号码</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgsjhm1" class="layui-input"/>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" v-if="form.table2.bgsx2==4">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮政编码</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgyzbm1" class="layui-input"/>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">固定电话</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bggddh1" class="layui-input"/>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" v-if="form.table2.bgsx2==5">
                                <label class="layui-form-label">转入至</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.zrsheng1" lay-filter="zrsheng1">
                                        <option value="">请选择省(自治区、直辖市)</option>
                                        <option v-bind:value="option.key" v-for="option in shengOptions">{{option.value}}</option>
                                    </select>
                                </div>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.zrshi1" lay-filter="zrshi1">
                                        <option value="">请选择市(地、州)</option>
                                        <option v-bind:value="option.key" v-for="option in zrshiOptions1">{{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div v-if="form.table2.bgsx2">
                            <div class="layui-form-item">
                                <div class="layui-inline">

                                    <label class="layui-form-label">变更事项3</label>
                                    <div class="layui-input-inline">
                                        <select v-model="form.table2.bgsx3" lay-filter="jdcBgsx3">
                                            <option value="">请选择变更事项</option>
                                            <option v-bind:value="option.key" v-for="option in bgsxOptions3">{{option.value}}</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline" v-if="(form.table2.bgsx3>0&&form.table2.bgsx3<=3)||form.table2.bgsx3>=7">
                                    <label class="layui-form-label">变更后</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgnr3" class="layui-input"/>
                                    </div>
                                </div>

                                <div class="layui-inline" v-if="form.table2.bgsx3==6">
                                    <label class="layui-form-label">变更后</label>
                                    <div class="layui-input-inline">
                                        <select v-model="form.table2.bgsyxz1" lay-filter="bgsyxz1">
                                            <option value="">请选择使用性质</option>
                                            <option v-bind:value="option.key" v-for="option in syxzOptions">{{option.value}}</option>
                                        </select>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item" v-if="form.table2.bgsx3==4">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮寄地址</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgyjdz1" class="layui-input"/>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">手机号码</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgsjhm1" class="layui-input"/>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" v-if="form.table2.bgsx3==4">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮政编码</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bgyzbm1" class="layui-input"/>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">固定电话</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.bggddh1" class="layui-input"/>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" v-if="form.table2.bgsx3==5">
                                <label class="layui-form-label">转入至</label>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.zrsheng1" lay-filter="zrsheng1">
                                        <option value="">请选择省(自治区、直辖市)</option>
                                        <option v-bind:value="option.key" v-for="option in shengOptions">{{option.value}}</option>
                                    </select>
                                </div>
                                <div class="layui-input-inline">
                                    <select v-model="form.table2.zrshi1" lay-filter="zrshi1">
                                        <option value="">请选择市(地、州)</option>
                                        <option v-bind:value="option.key" v-for="option in zrshiOptions1">{{option.value}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>


                    </div>

                    <div v-if="form.serviceType==5||form.serviceType==6">
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                            <legend style="font-size: 16px">抵押权人/典当行</legend>
                        </fieldset>

                        <div class="layui-form">
                            <div class="layui-form-item">

                                <div class="layui-inline">
                                    <label class="layui-form-label">备案信息</label>
                                    <div class="layui-input-inline" style="width: 534px;">
                                        <select v-model="form.table2.dybaId" lay-filter="dybaId" id="dybaId">
                                            <option value="">请选择备案信息</option>
                                            <option value="0">无备案信息</option>
                                            <option v-for="option in dybaList" :value="option.id">{{option.yhqc}} ({{option.fbdm}})</option>
                                        </select>
                                    </div>
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">姓名/名称</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" :disabled="form.table2.dybaId!='0'" v-model="form.table2.dyba.yhqc" style="width: 534px;"
                                                   class="layui-input"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">信用代码</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" :disabled="form.table2.dybaId!='0'" v-model="form.table2.dyba.xydm" style="width: 534px;"
                                                   class="layui-input"/>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮寄地址</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" v-model="form.table2.dybaYjdz" style="width: 534px;" class="layui-input"/>
                                        </div>
                                    </div>
                                </div>

                            </div>

                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">邮政编码</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" v-model="form.table2.dybaYzbm" class="layui-input"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">联系电话</label>
                                    <div class="layui-input-inline">
                                        <input type="text" v-model="form.table2.dybaLxdh" class="layui-input"/>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>


                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                        <legend style="font-size: 16px">用户签名</legend>

                        <div class="layui-form" style="text-align: center">
                            <br/>

                            <img width="400" height="190" :src="signSrc"
                                 style="background-color: #eeeeee;border-radius: 15px;"/>
                            <br/>

                        </div>
                    </fieldset>
                    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;" v-if="form.serviceType==5||form.serviceType==6">
                        <legend style="font-size: 16px">抵押权人/典当行签名</legend>

                        <div class="layui-form" style="text-align: center">
                            <br/>
                            <img width="400" height="190" :src="signSrc2"
                                 style="background-color: #eeeeee;border-radius: 15px;"/>
                            <br/>

                        </div>
                    </fieldset>

                    <div style="text-align: center">
                        <button
                                :class="['layui-btn',{'layui-btn-normal':form.showSignPad},{'layui-btn-primary':!form.showSignPad}]"
                                v-on:click="showSignPad">{{signPadBtnName}}
                        </button>
                        <button v-if="form.serviceType==5||form.serviceType==6"
                                :class="['layui-btn',{'layui-btn-normal':form.showSignPad2},{'layui-btn-primary':!form.showSignPad2}]"
                                v-on:click="showSignPad2">{{signPadBtnName2}}
                        </button>

                        <button
                                :class="['layui-btn',{'layui-btn-normal':form.table2.showTable},{'layui-btn-primary':!form.table2.showTable}]"
                                v-on:click="showTable2">{{tableBtnName}}
                        </button>
                        <button class="layui-btn layui-btn-normal" onclick="showCarSubmit();">保存申请</button>
                        <button class="layui-btn layui-btn-normal" onclick="showClipboard();">手工录入</button>
                    </div>

                </div>


            </div>


            <div class="layui-field-box" id="table_div3"
                 :style="{display:form.currentInfo.type==null?'block':'none'}">
                <div>
                    <div style="padding-top: 50px;height: 66px;" class="page_btn"
                         :class="['page_btn',{'page_btn_current':viewId==10}]" onclick="clearView('changeView')">欢迎页
                    </div>
                    <div style="clear: both;"></div>
                </div>
                <div>
                    <div class="page_btn" :class="['page_btn',{'page_btn_current':viewId==21}]"
                         onclick="changeView(21)">人证核验<br/>(个人办理)
                    </div>
                    <div class="page_btn" :class="['page_btn',{'page_btn_current':viewId==22}]"
                         onclick="changeView(22)">人证核验<br/>(代理办理)
                    </div>
                    <div class="page_btn" :class="['page_btn',{'page_btn_current':viewId==23}]"
                         onclick="changeView(23)">人证核验<br/>(单位办理)
                    </div>
                    <div class="page_btn" :class="['page_btn',{'page_btn_current':viewId==25}]"
                         onclick="changeView(25)">人证核验<br/>(抵押业务)
                    </div>
                    <!--<div class="page_btn" :class="['page_btn',{'page_btn_current':viewId==26}]"-->
                    <!--onclick="changeView(26)">人证核验<br/>(单位抵押)-->
                    <!--</div>-->
                    <div style="clear: both;"></div>

                </div>
                <div>
                    <div style="padding-top: 50px;height: 66px;" class="page_btn"
                         :class="['page_btn',{'page_btn_current':viewId==30}]" onclick="passIdMatch();">业务办理
                    </div>
                    <div style="clear: both;"></div>

                </div>


            </div>

        </fieldset>

    </div>

    <div id="button_area">

        <div onclick="clearView('changeView');"
             style="width: 60px;height: 54px;background-image: url('images/home.png');background-size: 36px 36px;background-position: 10px 18px;background-repeat: no-repeat;cursor: pointer;"></div>

        <div onclick="showScanPad();"
             style="position: relative;width: 60px;height: 54px;background-image: url('images/image_data.png');background-size: 32px 32px;background-position: 12px 18px;background-repeat: no-repeat;cursor: pointer;">
            <div v-if="imageData&&imageData.length>0"
                 style="position: absolute;left: 30px;top: 15px;background: red;width: 16px;height: 16px; font-size: 10px; line-height: 16px;color: white;text-align: center;border-radius: 8px;">
                {{imageData.length}}
            </div>
        </div>

        <div onclick="showSfzBoard();"
             style="width: 60px;height: 54px;background-image: url('images/card2.png');background-size: 32px 32px;background-position: 12px 16px;background-repeat: no-repeat;cursor: pointer;"></div>

        <div onclick="showAddCarBoard();"
             style="width: 60px;height: 54px;background-image: url('images/addCar.png');background-size: 34px 34px;background-position: 10px 10px;background-repeat: no-repeat;cursor: pointer;"></div>


    </div>


    <div id="resultBoard" style="display: none;">
        <div class="layui-form" style="padding-top: 20px;">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 60px;">流水号</label>
                    <div class="layui-input-inline">
                        <input id="resultLsh" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button class="layui-btn layui-btn-normal" onclick="closeResulteBoard ();">关闭</button>
            </div>
        </div>

    </div>

    <div id="sfzBoard" style="display: none;">
        <div class="layui-form" style="padding-top: 20px;">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 60px;">身份证号</label>
                    <div class="layui-input-inline">
                        <input id="inputSfz" class="layui-input"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button class="layui-btn layui-btn-normal" onclick="querySfz();">查询</button>
            </div>
        </div>
    </div>


    <div id="addCarBoard" style="display: none;overflow: visible;">
        <div class="layui-form" style="padding-top: 20px;overflow: visible;">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 60px;">号牌种类</label>
                    <div class="layui-input-inline">
                        <select lay-filter="inputHpzl" id="inputHpzl">
                            <option value="">请选择号牌种类</option>
                            <option v-bind:value="option.key" v-for="option in hpzlOptions">{{option.value}}</option>
                        </select></div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: 60px;">号牌种类</label>
                    <div class="layui-input-inline">
                        <input id="inputHphm" class="layui-input" placeholder="鲁"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button class="layui-btn layui-btn-normal" onclick="addCar();">查询</button>
            </div>
        </div>
    </div>


    <div id="clipboard" style="display: none;">
        <div class="layui-form" style="padding-top: 20px;">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">业务类型</label>
                    <div class="layui-input-inline">
                        <input id="clipboardYwlx" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-inline">
                        <input id="clipboardXm" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">身份证号</label>
                    <div class="layui-input-inline">
                        <input id="clipboardSfzh" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">流水号</label>
                    <div class="layui-input-inline">
                        <input id="clipboardLsh" class="layui-input"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">排队号</label>
                    <div class="layui-input-inline">
                        <input id="clipboardPdh" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">住址</label>
                    <div class="layui-input-inline">
                        <input id="clipboardZz" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">电话号码</label>
                    <div class="layui-input-inline">
                        <input id="clipboardDhhm" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">车牌号</label>
                    <div class="layui-input-inline">
                        <input id="clipboardCph" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">完税种类</label>
                    <div class="layui-input-inline">
                        <input id="clipboardWszl" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">完税号码</label>
                    <div class="layui-input-inline">
                        <input id="clipboardWshm" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">来历种类</label>
                    <div class="layui-input-inline">
                        <input id="clipboardLlzl" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">来历号码</label>
                    <div class="layui-input-inline">
                        <input id="clipboardLlhm" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">邮寄地址</label>
                    <div class="layui-input-inline">
                        <input id="clipboardYjdz" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">邮寄电话</label>
                    <div class="layui-input-inline">
                        <input id="clipboardYjdh" class="layui-input"
                               onclick="doCopy(this);"/>
                    </div>
                </div>

            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button class="layui-btn layui-btn-primary" onclick="hideClipboard();">关闭剪切板</button>
                <button class="layui-btn layui-btn-normal" onclick="saveInfo();">保存申请</button>
            </div>
        </div>
    </div>

    <div>
        <div style="display: none;" id="scanPad">
            <div style="display: flex;flex-direction: row;">
                <div style="width: 600px;height: 490px;">
                    <div>
                        <form id="form1" runat="server" style="border: 2px solid #2881FB;margin: 10px 20px;">
                            <object clsid="{454C18E2-8B7D-43C6-8C17-B1825B49D7DE}" id="captrue" width="556" height="423"
                                    type="application/x-itst-activex" style="z-index: 10;position: relative;">

                            </object>
                            <div style="text-align: center;width: 556px; height: 45px;display: flex;flex-direction: row;margin-top: -3px;border-top: 2px solid #2881FB;">
                                <div style="border-right: 2px solid #2881FB;" onclick="startCam()"
                                     :class="[{cam_btn_checked:scanMode==0},{cam_btn_unchecked:scanMode!=0}]">&nbsp;相机
                                </div>
                                <div onclick="startScan()" style="border-right: 2px solid #2881FB;"
                                     :class="[{scan_btn_checked:scanMode==3},{scan_btn_unchecked:scanMode!=3}]">&nbsp;扫描
                                </div>
                                <div onclick="startCard()" style="border-right: 2px solid #2881FB;"
                                     :class="[{card_btn_checked:scanMode==4},{card_btn_unchecked:scanMode!=4}]">&nbsp;证件
                                </div>
                                <div onclick="ParaSetPIN_onclick()"
                                     class="setting_btn_unchecked">&nbsp;设置
                                </div>

                            </div>

                            <!--<img src="images/cam.png" style="cursor: pointer;width: 40px;margin-right: 30px;" onclick="startCam();"/>-->
                            <!--<img src="images/scan.png" style="cursor: pointer;width: 40px;" onclick="startScan();"/>-->
                        </form>
                    </div>
                </div>
                <div style="width: 155px;height: 490px;">
                    <div v-for="imageType in imageTypeOptions">
                        <button class="layui-btn layui-btn-lg layui-btn-normal" style="margin-top:10px;margin-bottom: 8px;width: 210px;"
                                v-on:click="getImage(imageType.key)">{{imageType.value}}
                        </button>
                    </div>
                </div>
            </div>


            <div style="margin-top: 10px;padding-left: 20px;">
                <div v-for="image in imageData" style="width: 132px;float: left;position: relative;height: 130px">
                    <img v-on:click="showBigImage(image.base64)" :src="['data:image/png;base64,'+image.base64]" width="122" height="90"
                         style="position: absolute;top: 10px;left: 3px;cursor: pointer;"/>
                    <div v-on:click="deleteImage(image.uuid)"
                         style="height: 16px;width: 16px;background-image: url('images/close.png');background-size: cover;position: absolute;top: 4px;left:115px;cursor: pointer;"></div>
                    <div v-on:click="showBigImage(image.base64)"
                         style="position: absolute;top:98px;width: 122px;text-align: center;color: #2881FB;line-height: 14px;cursor: pointer;font-size: 12px;padding: 0 4px;">
                        {{imageTypeName(image.type)}}
                    </div>

                </div>

                <div style="clear: both;"></div>
            </div>
        </div>
    </div>
</div>


<div id="verify_result" style="display: none;">

</div>

<script>


    Date.prototype.format = function (fmt) { //author: meizz
        var o = {
            "M+": this.getMonth() + 1, //月份
            "d+": this.getDate(), //日
            "h+": this.getHours(), //小时
            "m+": this.getMinutes(), //分
            "s+": this.getSeconds(), //秒
            "q+": Math.floor((this.getMonth() + 3) / 3), //季度
            "S": this.getMilliseconds() //毫秒
        };
        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o)
            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
    };




    var year = new Date().getFullYear();
    var month = new Date().getMonth() + 1;
    var day = new Date().getDate();


    var app = new Vue({
        el: "#app",

        created: function () {
            var that = this;



            var url = location.search;
            url = url.substr(1);

            var paramsString = url.split("&");
            for (var i = 0; i < paramsString.length; i++) {
                var key = paramsString[i].split("=")[0];
                var value = paramsString[i].split("=")[1];
                if (key == 'scry') {
                    scry = value;
                }
                if (key == 'scrymc') {
                    scrymc = decodeURI(value);
                }
                if (key == 'orgCode') {
                    orgCode = value;
                }
                if (key == 'userName') {
                    userName = value;
                }
            }


            $.post("/cjg/ywlx", data, function (res) {
                that.jdcYwdlArray = res.jdcYwdlArray;
                that.jdcYwlxArray = res.jdcYwlxArray;
                that.jszYwlxArray = res.jszYwlxArray;
            });


            var data = {};
            var msg = {type: 'changeView', viewId: 10};
            data = {msg: JSON.stringify(msg)};
            $.post("/cjg/postOut", data, function (res) {

            });



            $.post("/cjg/login", {yhzh: userName, yhm: scrymc,orgCode:orgCode}, function (res) {
                that.clientId = res.clientId;
                if (res.signSrc) {
                    that.mySign = res.signSrc;

                }

                glbm = res.glbm;
                xzqhShi = res.xzqhShi;
            });
        },
        data: {
            xzqhShi: xzqhShi,
            glbm : glbm,
            jdcYwdlArray: [],
            jdcYwlxArray: [],
            jszYwlxArray: [],
            companyFlag: false,
            scanMode: 3,
            scanCount: 0,
            dybaList: [],
            idFoldFlag: false,
            idMatchFlag1: false,
            idMatchFlag2: false,
            bigImage: '',
            imageData: [],
            idMatchResult: false,
            sqrMatchIcon: null,
            sqrMatchTips: null,
            dlrMatchIcon: null,
            dlrMatchTips: null,
            sqrMatchFlag: false,
            dlrMatchFlag: false,
            person: null,
            sqr: null,
            dlr: null,
            form: {
                manualFlag: false,
                ytjxx: false,
                tjxx: null,
                year: year,
                month: month,
                day: day,
                serviceType: '',
                step: 100,
                manInfo: null,
                carInfoList: [],
                currentInfoVal: null,
                currentInfo: {
                    type: null
                },
                newCarInfo: null,
                newManInfo: null,
                transferInManInfo: null,
                transferInManInfo2: null,
                transferCarInfo: null,
                table1: {
                    xzqhSheng: null,
                    xzqhShi: null,
                    xzqhQu: null,
                    ywlx1: null,
                    zjcx1: null,
                    qdly1: null,
                    yy1: null,
                    showTable: false,
                    bgsx1: "",
                    bgnr1: "",
                    bgsx2: "",
                    bgnr2: "",
                    lxzsxzqh:"",
                    lxzsxxdz:"",
                    djzsxzqh:"",
                    djzsxxdz:""
                },
                table2: {
                    xhphm:'鲁',
                    ywdl1: '',
                    ywlx1: '',
                    zjcx1: null,
                    qdly1: null,
                    yy1: null,
                    showTable: false,
                    sheng: null,
                    shi: null,
                    bgsx1: '',
                    bgsx2: '',
                    bgsx3: '',
                    zrsheng1: '',
                    zrshi1: '',
                    zrsheng2: '',
                    zrshi2: '',
                    zrsheng3: '',
                    zrshi3: '',
                    dybaId: '',
                    dyba: {},
                    dybaLxdh: null,
                    dybaYjdz: null,
                    dybaYzbm: null,
                    bxsxrq:null,
                    bxzzrq:null,
                    xh:null,
                    fzjg:null
                },
                showSignPad: false,
                showSignPad2: false,
                clipboard: {}
            },
            signSrc: 'images/noSign.png',
            signSrc2: 'images/noSign.png',
            xcrx: '',
            xcrx2: '',
            idMatch: false,
            viewId: 0
        },
        methods: {

            passSqrMatch: function () {
                passIdMatch('sqr');
            },
            passDlrMatch: function () {
                passIdMatch('dlr');
            },
            selectInfo: function (val) {

                if ((this.serviceType == 5 || form.serviceType == 6) && val.type != "car") {
                    layer.alert("当前办理业务为抵押解押，只能选择现有车辆。", {
                        // skin: 'layui-layer-lan',
                        closeBtn: 0,
                        anim: 4 //动画类型
                    });
                    return;
                }


                if (val.zt != 'A') {
                    var tips;
                    if (val.type == 'man') {
                        tips = "所选驾驶证处于" + val.ztmc + "状态,请谨慎处理!";
                    }

                    if (val.type == 'car') {
                        tips = "所选车辆处于" + val.ztmc + "状态,请谨慎处理!";
                    }
                    layer.alert(tips, {
                        // skin: 'layui-layer-lan',
                        closeBtn: 0,
                        anim: 4 //动画类型
                    });

                }


                this.form.table1.showTable = false;
                this.form.table2.showTable = false;

                this.form.currentInfo = val;

                $("#xm1").attr("disabled", false);
                $("#xb1").attr("disabled", false);
                $("#xm2").attr("disabled", false);


                if (this.sqr && this.sqr.xm) {
                    this.form.table1.xm = this.sqr.xm;
                    this.form.table1.xb = this.sqr.xb;
                    this.form.table1.csrq = this.sqr.csrq;
                    this.form.table1.gj = '中国';
                    this.form.table1.yjdz = this.sqr.address;
                    this.form.table1.sfzmhm1 = this.sqr.sfzmhm;
                    this.form.table1.hjdz = this.sqr.hjdz;
                    this.form.table1.sfzdz = this.sqr.address;
                    if (this.form.manInfo) {
                        this.form.table1.dabh = this.form.manInfo.dabh;
                        this.form.table1.zjcx = this.form.manInfo.zjcx;
                    }
                    this.form.table2.sfzmhm = this.sqr.sfzmhm;

                    this.form.table2.yjdz = this.sqr.address;
                    this.form.table2.xm = this.sqr.xm;
                }
                else if (this.form.manInfo) {
                    this.form.table1.xm = this.form.manInfo.xm;
                    this.form.table1.xb = this.form.manInfo.xbmc;
                    this.form.table1.csrq = this.form.manInfo.csrq;
                    this.form.table1.gj = '中国';
                    this.form.table1.yjdz = this.form.manInfo.lxzsxxdz;
                    this.form.table1.dabh = this.form.manInfo.dabh;
                    this.form.table1.zjcx = this.form.manInfo.zjcx;
                    this.form.table1.sfzmhm1 = this.form.manInfo.sfzmhm;


                    this.form.table2.sfzmhm = this.form.manInfo.sfzmhm;
                    this.form.table2.yjdz = this.form.manInfo.lxzsxxdz;
                    this.form.table2.xm = this.form.manInfo.xm;
                }
                else {
                    $("#xm1").attr("disabled", false);
                    $("#xb1").attr("disabled", false);
                    $("#xm2").attr("disabled", false);
                    this.form.table1.csrq = this.sqr.sfzmhm.substring(6, 10) + "-" + this.sqr.sfzmhm.substring(10, 12) + "-" + this.sqr.sfzmhm.substring(12, 14);
                    this.form.table1.gj = '中国';
                }


                if (val.type == 'man') {


                    if (this.form.manInfo) {
                        this.form.table1.gddh = this.form.manInfo.lxdh;
                        this.form.table1.sjhm = this.form.manInfo.sjhm;
                        this.form.table1.yzbm = this.form.manInfo.lxzsyzbm;
                        this.form.table1.dzyx = this.form.manInfo.dzyx;
                        this.form.table1.xzqhSheng = this.form.manInfo.xzqhSheng;
                        this.form.table1.xzqhShi = this.form.manInfo.xzqhShi;
                        this.form.table1.lxzsxzqh = this.form.manInfo.lxzsxzqh;
                        this.form.table1.zjcx = this.form.manInfo.zjcx;

                        this.form.table1.dabh = this.form.manInfo.dabh;
                        this.form.table1.cclzrq = this.form.manInfo.cclzrq;
                        this.form.table1.yxqs = this.form.manInfo.yxqs;
                        this.form.table1.yxqz = this.form.manInfo.yxqz;
                        this.form.table1.yxq = this.form.manInfo.yxq;
                        this.form.table1.djzsxzqh = this.form.manInfo.djzsxzqh;
                        this.form.table1.djzsxxdz = this.form.manInfo.djzsxxdz;



                    }
                    if (this.dlr) {
                        this.form.table1.dlrxm = this.dlr.xm;
                        this.form.table1.dlrsfzmmc = '居民身份证';
                        this.form.table1.dlrsfzmhm = this.dlr.sfzmhm;
                        this.form.table1.dlrlxdz = this.dlr.address;
                    }
                    this.form.currentInfoVal = val.sfzmhm;
                    this.form.table1.ywlx1 = "";
                    $("#ywlx1").attr("disabled", false);


                }
                else if (val.type == 'car') {

                    this.form.table2.xm = val.syr;
                    this.form.table2.yzbm = val.yzbm;
                    this.form.table2.yjdz = val.zsxxdz;
                    this.form.table2.sjhm = val.sjhm;


                    this.form.table2.hpzlmc = val.hpzlmc;
                    this.form.table2.sjhm = val.sjhm;
                    this.form.table2.yzbm = val.yzbm;

                    this.form.table2.gddh = val.lxdh;

                    this.form.table2.hpzl = val.hpzl;
                    this.form.table2.hphm = "鲁" + val.hphm;
                    this.form.table2.ppxh = val.clpp1 + "/" + val.clxh;
                    this.form.table2.clsbdh = val.clsbdh;
                    this.form.table2.syxz = val.syxz;
                    this.form.table2.glbm = val.glbm;
                    this.form.table2.xh = val.xh;
                    this.form.table2.bxsxrq = val.bxsxrq;
                    this.form.table2.bxzzrq = val.bxzzrq;
                    this.form.table2.clxh = val.clxh;
                    this.form.table2.fzjg = val.fzjg;


                    $("#hphm").attr("disabled", true);
                    $("#hpzl").attr("disabled", true);
                    $("#ppxh").attr("disabled", true);
                    $("#clsbdh").attr("disabled", true);
                    $("#syxz").attr("disabled", true);

                    this.form.table2.ywdl1 = '';
                    this.form.table2.ywlx1 = '';

                    $("#jdcYwdl1").attr("disabled", false);
                    $("#jdcYwlx1").attr("disabled", false);

                    if (this.dlr) {
                        this.form.table2.dlrxm = this.dlr.xm;
                        this.form.table2.dlrsfzmmc = '居民身份证';
                        this.form.table2.dlrsfzmhm = this.dlr.sfzmhm;
                        this.form.table2.dlrlxdz = this.dlr.address;
                    }

                    this.form.currentInfoVal = val.hphm;

                    if (this.form.serviceType == 5) {
                        this.form.table2.ywdl1 = '4';
                        setTimeout(function () {
                            $("#jdcYwdl1").attr("disabled", true);
                        }, 100);
                    }

                }
                else {
                    this.form.currentInfoVal = val.value;
                    if (val.type == 'newMan') {
                        this.form.table1.ywlx1 = 1;
                        $("#ywlx1").attr("disabled", true);
                        this.form.table1.xm = this.sqr.xm;
                        this.form.table1.xb = this.sqr.xb;
                        this.form.table1.yjdz = this.sqr.address;
                        this.form.table1.sfzmhm1 = this.sqr.sfzmhm;
                    }
                    else {
                        this.form.table2.xm = this.sqr.xm;
                        this.form.table2.xb = this.sqr.xb;
                        this.form.table2.yjdz = this.sqr.address;
                        this.form.table2.sfzmhm1 = this.sqr.sfzmhm;

                        this.form.table2.hphm = "鲁";
                        this.form.table2.hpzl = "";
                        this.form.table2.ppxh = "";
                        this.form.table2.clsbdh = "";
                        this.form.table2.syxz = "";

                        $("#hphm").attr("disabled", false);
                        $("#hpzl").attr("disabled", false);
                        $("#ppxh").attr("disabled", false);
                        $("#clsbdh").attr("disabled", false);
                        $("#syxz").attr("disabled", false);


                        if (val.type == 'newCar') {
                            this.form.table2.ywdl1 = '2';
                            this.form.table2.ywlx1 = '201';
                        }
                        if (val.type == 'transferIn') {
                            this.form.table2.ywdl1 = '2';
                            this.form.table2.ywlx1 = '204';
                        }
                        if (val.type == 'outerCar') {
                            this.form.table2.ywdl1 = '0';
                            this.form.table2.ywlx1 = '1';
                        }

                        setTimeout(function () {
                            $("#jdcYwdl1").attr("disabled", true);
                            $("#jdcYwlx1").attr("disabled", true);
                        }, 100);

                    }
                }

                setTimeout(function () {
                    form.render("select");
                }, 300);


            },
            showSignPad: function () {
                if (app.form.currentInfo.type == 'man' || app.form.currentInfo.type == 'newMan') {
                    if (!app.form.table1.ywlx1) {
                        layer.msg("请先选择要办理的业务类型");
                        return;
                    }
                }
                if (app.form.currentInfo.type == 'car' || app.form.currentInfo.type == 'newCar' || app.form.currentInfo.type == 'transferIn') {
                    if (!app.form.table2.ywlx1) {
                        layer.msg("请先选择要办理的业务类型");
                        return;
                    }
                }
                if (this.form.showSignPad) {
                    this.form.showSignPad = false;
                }
                else {
                    this.form.showSignPad = true;
                    this.form.showSignPad2 = false;
                    this.form.table1.showTable = false;
                    this.form.table2.showTable = false;
                }
            },
            showSignPad2: function () {
                if (this.form.showSignPad2) {
                    this.form.showSignPad2 = false;
                }
                else {
                    this.form.showSignPad2 = true;
                    this.form.showSignPad = false;
                    this.form.table1.showTable = false;
                    this.form.table2.showTable = false;
                }
            }
            ,
            showTable1: function () {
                if (!app.form.table1.ywlx1) {
                    layer.msg("请先选择要办理的业务类型");
                    return;
                }


                if (this.form.table1.showTable) {
                    this.form.table1.showTable = false;
                }
                else {
                    this.form.table1.showTable = true;
                    this.form.table2.showTable = false;
                    this.form.showSignPad = false;
                    this.form.showSignPad2 = false;
                }
            }
            ,
            showTable2: function () {
                if (!app.form.table2.ywlx1) {
                    layer.msg("请先选择要办理的业务类型");
                    return;
                }

                if (this.form.table2.showTable) {
                    this.form.table2.showTable = false;
                }
                else {
                    this.form.table2.showTable = true;
                    this.form.table1.showTable = false;
                    this.form.showSignPad = false;
                    this.form.showSignPad2 = false;
                }
            },
            showBigImage: function (base64) {
                $("#captrue").width(0);

                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    area: ['1024px', '768px'],
                    skin: 'layui-layer-nobg', //没有背景色
                    shadeClose: true,
                    content: "<img  width='1024' src='data:image/png;base64," + base64 + "'/>",
                    end: function () {
                        $("#captrue").width(556);
                    }
                });
            },
            deleteImage: function (uuid) {
                var result = [];
                for (var i = 0; i < this.imageData.length; i++) {
                    if (this.imageData[i].uuid != uuid) {
                        result.push(this.imageData[i]);
                    }
                }


                this.imageData = result;
            },
            getImage: function (type) {
                // var str=
                // .bSavePNG("D:\\","PNG");
                // alert(str);

                // if (!scanInitFlag) {
                //     layer.msg("高拍仪初始化中,请稍等...");
                //     return;
                // }

                var base64 = captrue.sGetBase64();
                this.scanCount++;
                // var base64 = imageBase64;
                if (this.scanMode != 4 || this.scanCount % 2 == 0) {
                    var uuid = guid();
                    var photo = {type: type, uuid: uuid, base64: base64, scry: scry, sfzmhm: this.sqr.sfzmhm};
                    this.imageData.push(photo);
                    $.post("/cjg/scan", photo, function (res) {
                        if (res.result != 'ok') {
                            //app.deleteImage(uuid);
                        }
                    });
                }
            },
            imageTypeName: function (type) {
                return getValue(imageTypeOptions, type);
            }
        },
        computed: {
            ywdlmc: function () {

                if (!this.form.currentInfo) {
                    return "等待用户身份验证";
                }

                if (this.form.currentInfo.type == 'man' || this.form.currentInfo.value == 'newMan') {
                    return "办理驾驶证业务";
                }
                else if (this.form.currentInfo.type == 'car' || this.form.currentInfo.value == 'newCar' || this.form.currentInfo.value == 'transferIn') {
                    return "办理机动车业务";
                }
                else {
                    return "等待用户身份验证";
                }

            },
            qdlyOptions1: function () {
                if (this.form.table1.ywlx1 == 1) {
                    return [{key: 1, value: '驾校培训'}, {key: 2, value: '有驾驶经历'}, {key: 3, value: '自学直考'}];
                }
                if (this.form.table1.ywlx1 == 2) {
                    return [{key: 4, value: '驾校培训'}, {key: 5, value: '全日制职业教育'},
                        {key: 6, value: '最高准驾车型被注销'}, {key: 7, value: '自学直考'}];
                }
                if (this.form.table1.ywlx1 == 3) {
                    return [{key: 8, value: '军队驾驶证'}, {key: 9, value: '武警驾驶证'}];
                }
                if (this.form.table1.ywlx1 == 4) {
                    return [{key: 10, value: '香港驾驶证'}, {key: 11, value: '澳门驾驶证'}, {key: 12, value: '台湾驾驶证'},
                        {key: 13, value: '外国驾驶证'}];
                }
                if (this.form.table1.ywlx1 == 21) {
                    return [{key: 14, value: '驾校培训'}, {key: 15, value: '有驾驶经历'}, {key: 16, value: '自学直考'}];
                }
                return [];
            },
            jdcMxyyOptions: function () {
                if (this.form.table2.ywlx1 == 2) {
                    return [{key: 1, value: '丢失'}, {key: 2, value: '灭失'}, {key: 3, value: '前号牌'}, {
                        key: 3,
                        value: '后号牌'
                    }];
                }
                if (this.form.table2.ywlx1 == 3) {
                    return [{key: 5, value: '前号牌'}, {key: 6, value: '后号牌'}];
                }
                if (this.form.table2.ywlx1 == 4) {
                    return [{key: 7, value: '丢失'}, {key: 8, value: '灭失'}];
                }
                if (this.form.table2.ywlx1 == 7) {
                    return [{key: 9, value: '丢失'}, {key: 10, value: '灭失'}, {key: 11, value: '未获得'}];
                }
                if (this.form.table2.ywlx1 == 9) {
                    return [{key: 12, value: '在登记地车辆管理所申请'}, {key: 13, value: '在登记地以外车辆管理所申请'}];
                }
                if (this.form.table2.ywlx1 == 10) {
                    return [{key: 14, value: '丢失'}, {key: 15, value: '灭失'}];
                }
                return [];
            },
            yyOptions1: function () {
                if (this.form.table1.ywlx1 == 13) {
                    return [{key: 1, value: '丢失'}, {key: 2, value: '其他'}];
                }
                if (this.form.table1.ywlx1 == 14) {
                    return [{key: 3, value: '本人申请'}, {key: 4, value: '死亡'}, {key: 5, value: '身体条件不适合'},
                        {key: 6, value: '丧失民事行为能力'}, {key: 7, value: '其他'}];
                }
                if (this.form.table1.ywlx1 >= 15 & this.form.table1.ywlx1 <= 16) {
                    return [{key: 8, value: '发生交通事故造成人员死亡，承担同等以上责任'}, {key: 9, value: '连续三个计分周期不参加审验'},
                        {key: 10, value: '记满12分'}, {key: 11, value: '延长的实习期内再次记6分以上但未达到12分'}];
                }
                if (this.form.table1.ywlx1 == 17) {
                    return [{key: 12, value: '超过有效期一年以上未换证被注销未满两年'},
                        {key: 13, value: '未按规定提交体检证明被注销且机动车驾驶证在有效期内或超过有效期不满一年'}];
                }
                if (this.form.table1.ywlx1 >= 18 && this.form.table2.ywlx <= 20) {
                    return [{key: 14, value: '服兵役'}, {key: 15, value: '出国（境）'}, {key: 16, value: '其他'}];
                }
                if (this.form.table1.ywlx1 == 32) {
                    return [{key: 31, value: '本人申请'},
                        {key: 32, value: '年龄条件不适合'},
                        {key: 33, value: '身体条件不适合'},
                        {key: 34, value: '在致人死亡或者重伤的交通事故负有责任'},
                        {key: 35, value: '有严重交通违法行为'},
                        {key: 36, value: '有记满12分或者犯罪记录'},
                        {key: 37, value: '其他'}];
                }
                return [];

            },
            personPhoto: function () {
                if (this.person.zp) {
                    return "data:image/png;base64," + this.person.zp;
                }
                return "";
            },
            livePhoto: function () {
                if (this.person.xcrx) {
                    return "data:image/png;base64," + this.xcrx;
                }
                return "";
            },
            signPadBtnName: function () {
                if (this.form.serviceType == 5 || this.form.serviceType == 6) {
                    if (this.form.showSignPad) {
                        return "隐藏所有人签名";
                    }
                    else {
                        return "显示所有人签名";
                    }
                }
                else {
                    if (this.form.showSignPad) {
                        return "隐藏签名";
                    }
                    else {
                        return "显示签名";
                    }
                }
            },

            signPadBtnName2: function () {

                if (this.form.showSignPad2) {
                    return "隐藏代理人签名";
                }
                else {
                    return "显示代理人签名";
                }

            }
            ,
            tableBtnName: function () {
                if (this.form.table1.showTable || this.form.table2.showTable) {
                    return "隐藏表格";
                }
                else {
                    return "显示表格";
                }
            }, ywlxOptions: function () {
                return this.jszYwlxArray;
            },
            zjcxOptions: function () {
                return zjcxOptions;
            }, jdcYwlxOptions: function () {
                return getList(this.jdcYwlxArray, this.form.table2.ywdl1);
            }, jdcYwdlOptions: function () {
                return this.jdcYwdlArray;
            }, hpzlOptions: function () {
                return hpzlOptions;
            }, syxzOptions: function () {
                return syxzOptions;
            }, shengOptions: function () {
                var result = [];
                for (var i in xzqhOptions) {
                    if (!xzqhOptions[i].filter) {
                        result.push(xzqhOptions[i]);
                    }
                }
                return result;
            }, shiOptions: function () {
                var result = [];
                if (this.form.table2.sheng) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table2.sheng) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            }, xzqhShiOptions: function () {
                var result = [];
                if (this.form.table1.xzqhSheng) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table1.xzqhSheng) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            }, xzqhQuOptions: function () {
                var result = [];
                if (this.form.table1.xzqhShi) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table1.xzqhShi) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            },djzsxzqhOptions: function () {
                var result = [];
                if (this.form.table1.xzqhShi) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table1.xzqhShi) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            },lxzsxzqhOptions: function () {
                var result = [];
                if (this.form.table1.xzqhShi) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == xzqhShi) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            }, bgsxOptions1: function () {
                // var result = [];
                // for (var i in jdcBgsxOptions) {
                //     if (jdcBgsxOptions[i].key != this.form.table2.bgsx2 && jdcBgsxOptions[i].key != this.form.table2.bgsx3) {
                //         result.push(jdcBgsxOptions[i]);
                //     }
                // }
                return jdcBgsxOptions;
            },
            bgsxOptions2: function () {
                var result = [];
                for (var i in jdcBgsxOptions) {
                    if (jdcBgsxOptions[i].key != this.form.table2.bgsx1) {
                        result.push(jdcBgsxOptions[i]);
                    }
                }
                return result;
            },
            bgsxOptions3: function () {
                var result = [];
                for (var i in jdcBgsxOptions) {
                    if (jdcBgsxOptions[i].key != this.form.table2.bgsx1 && jdcBgsxOptions[i].key != this.form.table2.bgsx2) {
                        result.push(jdcBgsxOptions[i]);
                    }
                }
                return result;
            }, zrshiOptions1: function () {
                var result = [];
                if (this.form.table2.zrsheng1) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table2.zrsheng1) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            }, zrshiOptions2: function () {
                var result = [];
                if (this.form.table2.zrsheng2) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table2.zrsheng2) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            }, zrshiOptions3: function () {
                var result = [];
                if (this.form.table2.zrsheng3) {
                    for (var i in xzqhOptions) {
                        if (xzqhOptions[i].filter == this.form.table2.zrsheng3) {
                            result.push(xzqhOptions[i]);
                        }
                    }
                }
                return result;
            },
            imageTypeOptions: function () {

                var result = [];
                for (var option in imageTypeOptions) {
                    if (imageTypeOptions[option].type == this.scanMode) {
                        result.push(imageTypeOptions[option]);

                    }
                }
                return result;
            }


        }
    });

    var form;
    layui.use('form', function () {
        form = layui.form;
        var laydate = layui.laydate;
        form.render();
        //绑定业务类型1
        form.on("select(ywlx1)", function (data) {
            app.form.table1.ywlx1 = data.value;
            app.form.table1.qdly1 = '';
            app.form.table1.zjcx1 = null;
            app.form.table1.yy1 = null;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });
        form.on("select(sfzmmc1)", function (data) {
            app.form.table1.sfzmmc1 = data.value;
        });
        form.on("select(sfzmmc2)", function (data) {
            app.form.table1.sfzmmc2 = data.value;
        });
        form.on("select(qdly1)", function (data) {
            app.form.table1.qdly1 = data.value;
        });
        form.on("select(zjcx1)", function (data) {
            app.form.table1.zjcx1 = data.value;
        });
        form.on("select(yy1)", function (data) {
            app.form.table1.yy1 = data.value;
        });

        form.on("select(bgsx1)", function (data) {
            app.form.table1.bgsx1 = data.value;
        });

        form.on("select(bgsx2)", function (data) {
            app.form.table1.bgsx2 = data.value;
        });

        form.on("select(syxz)", function (data) {
            app.form.table2.syxz = data.value;
        });

        form.on("select(inputHpzl)", function (data) {
            $("#inputHpzl").val(data.value);
        });

        form.on("select(hpzl)", function (data) {
            app.form.table2.hpzlmc = getValue(hpzlOptions, data.value);
            app.form.table2.syxz = data.value;
        });

        form.on("select(sheng)", function (data) {
            app.form.table2.sheng = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(dybaId)", function (data) {
            app.form.table2.dybaId = data.value;
            if (app.form.table2.dybaId == '0') {
                app.form.table2.dyba = {yhqc: '', xydm: ''};
                app.form.table2.dybaLxdh = '';
                app.form.table2.dybaYjdz = '';
            }
            else {
                var dyba = getObject(app.dybaList, data.value);
                app.form.table2.dybaLxdh = dyba.dh;
                app.form.table2.dybaYjdz = dyba.yhdz;
                app.form.table2.dyba = dyba;
            }

            refreshSelect();
        });


        form.on("select(shi)", function (data) {
            app.form.table2.shi = data.value;
        });


        form.on("select(xzqhSheng)", function (data) {
            app.form.table1.xzqhSheng = data.value;
            app.form.table1.xzqhShi = "";
            app.form.table1.lxzsxzqh = "";

            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(xzqhShi)", function (data) {
            app.form.table1.xzqhShi = data.value;
            app.form.table1.lxzsxzqh = "";
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(xzqhQu)", function (data) {
            app.form.table1.lxzsxzqh = data.value;
        });

        form.on("select(djzsxzqh)", function (data) {
            app.form.table1.djzsxzqh = data.value;
        });

        form.on("select(zrsheng1)", function (data) {
            app.form.table2.zrsheng1 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(zrsheng2)", function (data) {
            app.form.table2.zrsheng2 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(zrsheng3)", function (data) {
            app.form.table2.zrsheng3 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(zrshi1)", function (data) {
            app.form.table2.zrshi1 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(zrshi2)", function (data) {
            app.form.table2.zrshi2 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(zrshi3)", function (data) {
            app.form.table2.zrshi3 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(bgsyxz1)", function (data) {
            app.form.table2.bgsyxz1 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(bgsyxz2)", function (data) {
            app.form.table2.bgsyxz2 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(bgsyxz3)", function (data) {
            app.form.table2.bgsyxz3 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(jdcBgsx1)", function (data) {
            app.form.table2.bgsx1 = data.value;
            if (data.value != '' && data.value == app.form.table2.bgsx3) {
                app.form.table2.bgsx3 = '';
            }
            else if (data.value != '' && data.value == app.form.table2.bgsx2) {
                app.form.table2.bgsx2 = '';
                app.form.table2.bgsx3 = '';
            }

            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(jdcBgsx2)", function (data) {
            app.form.table2.bgsx2 = data.value;
            if (data.value != '' && data.value == app.form.table2.bgsx3) {
                app.form.table2.bgsx3 = '';
            }
            setTimeout(function () {
                form.render('select');
            }, 300);
        });

        form.on("select(jdcBgsx3)", function (data) {
            app.form.table2.bgsx3 = data.value;
            setTimeout(function () {
                form.render('select');
            }, 300);
        });


        form.on("select(jdcYwdl1)", function (data) {

            if (app.form.table2.ywdl1 != data.value) {
                app.form.table2.ywdl1 = data.value;
                app.form.table2.ywlx1 = '';
                //6年免检
                if (data.value == '0') {
                    app.form.table2.ywlx1 = '1';
                }
                //机动车变更登记/备案
                else if (data.value == '3') {
                    app.form.table2.ywlx1 = '301';
                    app.form.table2.bgsx1 = '';
                    app.form.table2.bgsx2 = '';
                    app.form.table2.bgsx3 = '';
                }
                else if (data.value == '9') {
                    app.form.table2.ywlx1 = '901';

                } else {
                    app.form.table2.ywlx1 = '';
                }
                app.form.table2.bgsx1 = '';
                app.form.table2.bgsx2 = '';
                app.form.table2.bgsx3 = '';

                setTimeout(function () {
                    form.render('select');
                }, 300);
            }
        });

        form.on("select(jdcYwlx1)", function (data) {

            app.form.table2.ywlx1 = data.value;
            app.form.table2.mxyy1 = null;

            if (data.value == '201') {
                app.selectInfo(app.form.newCarInfo);
            }

            if (data.value == '204') {
                app.selectInfo(app.form.transferCarInfo);
            }


            setTimeout(function () {
                form.render('select');
            }, 300);

        });


        form.on("select(jdcMxyy1)", function (data) {
            app.form.table2.mxyy1 = data.value;
        });

        laydate.render({
            elem: "#csrq1"
        });
    });

    function onResize() {
        var windowHeight = $(window).height();
        $("#left_area_div").height(windowHeight - 70);

        var height = 319;
        if (app.idFoldFlag) {
            height = 109;
        }
        else {
            if (app.sqr && app.sqr.xm && app.dlr && app.dlr.xm) {
                height = 529;
            }
            else {
                height = 319;
            }
        }

        $("#table_div1").height(windowHeight - height);
        $("#table_div2").height(windowHeight - height);
        $("#table_div3").height(windowHeight - height);

    }

    $(document).ready(function () {
        onResize();
        initIn2out();
    });

    $(window).resize(function () {
        onResize();
    });

    var inProgress = false;

    var postCount = 0;


    function in2out(_input) {
        if (!inProgress) {
            inProgress = true;
            _input.type = 'form';
            var data = {};
            data.msg = JSON.stringify(_input);
            $.post("/cjg/in2out", data, function (res) {
                inProgress = false;

                if (res.type != 'null') {
                    //选择服务类型
                    if (res.type == 'changeView') {
                        app.viewId = res.viewId;

                    }
                    else if (res.type == 'changeServiceType') {
                        app.serviceType = res.serviceType;
                        app.form.serviceType = res.serviceType;

                        if (app.serviceType == 3) {
                            app.serviceType = 1;
                            app.form.serviceType = 1;
                            app.companyFlag = true;
                        }
                    }
                    //第一个人信息
                    else if (res.type == 'person1') {

                        var now = new Date();
                        var zjyxqz =  new Date(res.zjyxq.split("-")[1].replace(".","-").replace(".","-"));
                        if (now.getTime()>zjyxqz.getTime())
                        {
                            alert("(失效身份证比对失败)身份证件:"+res.sfzmhm+"不在有效期内");
                        }
                        pvsVerify(res.sfzmhm, res.xm);
                        app.person = res;
                        if (app.form.serviceType == 1) {
                            app.sqr = res; //申请人
                            setTimeout(function () {
                                html2canvas(document.querySelector("#sqr_div")).then(function (canvas) {
                                    canvas.getContext("2d").scale(0.3, 0.3);
                                    app.sfztp = canvas.toDataURL();

                                });
                            }, 300);
                        }
                        else if (app.form.serviceType == 5 || app.form.serviceType == 6) {
                            app.sqr = res;
                        }
                        else {

                            app.dlr = res; //办理人


                            app.form.table1.dlrDisplay = true;
                            app.form.table1.dlrxm = app.dlr.xm;
                            app.form.table1.dlrsfzmmc = '居民身份证';
                            app.form.table1.dlrsfzmhm = app.dlr.sfzmhm;
                            app.form.table1.dlrlxdz = app.dlr.address;

                            app.form.table2.dlrDisplay = true;
                            app.form.table2.dlrxm = app.dlr.xm;
                            app.form.table2.dlrsfzmmc = '居民身份证';
                            app.form.table2.dlrsfzmhm = app.dlr.sfzmhm;
                            app.form.table2.dlrlxdz = app.dlr.address;


                        }
                        foldIdDiv(true);
                    }
                    //第二个人信息
                    else if (res.type == 'person2') {
                        pvsVerify(res.sfzmhm, res.xm);
                        if (app.form.serviceType != 5 && app.form.serviceType != 6) {
                            app.person = res;
                            app.sqr = res;
                            // alert(JSON.stringify(res));
                            setTimeout(function () {
                                html2canvas(document.querySelector("#sqr_div")).then(function (canvas) {
                                    canvas.getContext("2d").scale(0.3, 0.3);
                                    app.sfztp = canvas.toDataURL();

                                });
                            }, 300);

                            app.form.table1.sfzmhm1 = app.sqr.sfzmhm;
                            app.form.table2.xm = app.sqr.xm;

                            refreshInfo();
                        }
                        else {
                            app.dlr = res;
                        }
                        foldIdDiv(true);
                    }
                    else if (res.type == 'idMatch') {

                        // layer.msg(res.result);
                        //app.idMatch = true;
                        if (res.xcrx) {
                            if (app.serviceType == 1) {
                                app.xcrx = "data:image/png;base64," + res.xcrx;
                            }
                            else if (app.serviceType == 2) {
                                app.xcrx2 = "data:image/png;base64," + res.xcrx;
                            }
                            else if (app.form.serviceType == 5 || app.form.serviceType == 6) {
                                if (!app.idMatchFlag1) {
                                    app.xcrx = "data:image/png;base64," + res.xcrx;
                                }
                                else {
                                    app.xcrx2 = "data:image/png;base64," + res.xcrx;
                                }
                            }
                        }

                        if (res.result == 'ok') {
                            if (app.serviceType == 1) {

                                app.sqrMatchTips = '人像比对成功!';
                                app.sqrMatchIcon = 'images/ok.png';
                                app.sqrMatchFlag = true;
                                refreshInfo();
                            } else if (app.form.serviceType == 5 || app.form.serviceType == 6) {
                                if (!app.idMatchFlag1) {

                                    app.sqrMatchTips = '人像比对成功!';
                                    app.sqrMatchIcon = 'images/ok.png';
                                    app.idMatchFlag1 = true;
                                    app.sqrMatchFlag = true;

                                }
                                else {

                                    app.dlrMatchTips = '人像比对成功!';
                                    app.dlrMatchIcon = 'images/ok.png';
                                    app.dlrMatchFlag = true;
                                    // app.form.table2.xm = app.sqr.xm;
                                    app.form.table2.dlrDisplay = false;
                                    refreshInfo();
                                }
                            }
                            else {
                                app.form.table1.dlrDisplay = true;
                                app.form.table1.dlrxm = app.dlr.xm;
                                app.form.table1.dlrsfzmmc = '居民身份证';
                                app.form.table1.dlrsfzmhm = app.dlr.sfzmhm;
                                app.form.table1.dlrlxdz = app.dlr.address;

                                app.form.table2.dlrDisplay = true;
                                app.form.table2.dlrxm = app.dlr.xm;
                                app.form.table2.dlrsfzmmc = '居民身份证';
                                app.form.table2.dlrsfzmhm = app.dlr.sfzmhm;
                                app.form.table2.dlrlxdz = app.dlr.address;


                                app.dlrMatchTips = '人像比对成功!';
                                app.dlrMatchIcon = 'images/ok.png';
                                app.dlrMatchFlag = true;

                            }
                        }
                        else {
                            if (app.serviceType == 1) {
                                app.sqrMatchTips = '人像比对失败!';
                                app.sqrMatchIcon = 'images/error.png';
                            } else if (app.serviceType == 5) {
                                if (!app.idMatchFlag1) {
                                    app.sqrMatchTips = '人像比对失败!';
                                    app.sqrMatchIcon = 'images/error.png';
                                }
                                else {
                                    app.dlrMatchTips = '人像比对失败!';
                                    app.dlrMatchIcon = 'images/error.png';
                                }
                            }
                            else {
                                app.dlrMatchTips = '人像比对失败!';
                                app.dlrMatchIcon = 'images/error.png';
                            }
                        }
                    }
                    else if (res.type == 'saveSign') {
                        app.form.showSignPad = false;
                        app.signSrc = res.src;
                    }
                    else if (res.type == 'saveSign2') {
                        app.form.showSignPad2 = false;
                        app.signSrc2 = res.src;
                    }
                    else if (res.type == 'hqSfzzp') {
                        sendSqrzp(app.sqr.zp);
                    }
                    else {
                        alert(res.type);
                    }
                }
            });

        }
        else {
            postCount++;
            if (postCount >= 20) {
                inProgress = false;
                postCount = 0;
            }
        }
    }


    function initIn2out() {
        setInterval(function () {
            in2out(app.form);
        }, 1000);
    }


    function clearView(op) {
        var data = {};
        var msg = {};
        msg.type = op;
        msg.viewId = 10;
        msg.lsh = app.lsh;
        msg = JSON.stringify(msg);
        data.msg = msg;
        $("#clipboard").hide();
        if (app.viewId>10)
        {
            app.viewId = 30;
        }

        $.post("/cjg/postOut", data, function (res) {
            app.lsh = null;
            app.form = {
                manualFlag: false,
                ytjxx: false,
                tjxx: null,
                year: year,
                month: month,
                day: day,
                serviceType: '',
                step: 100,
                manInfo: null,
                carInfoList: [],
                currentInfoVal: null,
                newCarInfo: null,
                newManInfo: null,
                transferInManInfo: null,
                transferInManInfo2: null,
                transferCarInfo: null,
                currentInfo: {
                    type: null
                },
                table1: {
                    xzqhSheng: null,
                    xzqhShi: null,
                    xzqhQu: null,
                    ywlx1: null,
                    zjcx1: null,
                    qdly1: null,
                    yy1: null,
                    showTable: false,
                    bgsx1: "",
                    bgnr1: "",
                    bgsx2: "",
                    bgnr2: "",
                    lxzsxzqh:"",
                    lxzsxxdz:"",
                    djzsxzqh:"",
                    djzsxxdz:""
                },
                table2: {
                    xhphm:'鲁',
                    ywdl1: '',
                    ywlx1: '',
                    yy1: null,
                    showTable: false,
                    sheng: null,
                    shi: null,
                    bgsx1: '',
                    bgsx2: '',
                    bgsx3: '',
                    zrsheng1: '',
                    zrshi1: '',
                    zrsheng2: '',
                    zrshi2: '',
                    zrsheng3: '',
                    zrshi3: '',
                    dybaId: '',
                    dyba: {},
                    dybaLxdh: null,
                    dybaYjdz: null,
                    dybaYzbm: null,
                    bxsxrq:null,
                    bxzzrq:null,
                    xh:null,
                    fzjg:null
                },
                showSignPad: false,
                showSignPad2: false,
                clipboard: {}
            };
            app.form.table1.ywlx1 = null;
            app.form.table1.zjcx1 = null;
            app.form.table1.qdly1 = null;
            app.form.table1.yy1 = null;
            app.form.table2.ywlx1 = null;
            app.form.table2.yy1 = null;
            app.person = null;
            app.sqr = null;
            app.dlr = null;
            app.xcrx = '';
            app.xcrx2 = '';
            app.signSrc = 'images/noSign.png';
            app.signSrc2 = 'images/noSign.png';
            app.idMatchFlag1 = false;
            app.idMatchFlag2 = false;
            app.idMatchResult = false;
            app.sqrMatchIcon = null;
            app.sqrMatchTips = null;
            app.dlrMatchIcon = null;
            app.dlrMatchTips = null;
            app.sqrMatchFlag = false;
            app.dlrMatchFlag = false;
            app.idFoldFlag = false;
            app.dybaList = [];
            app.imageData = [];
            app.serviceType = '';
            app.companyFlag = false;
        });

        $("#clipboardYwlx").val("");
        $("#clipboardXm").val("");
        $("#clipboardSfzh").val("");
        $("#clipboardZz").val("");
        $("#clipboardCph").val("");
        $("#clipboardYjdh").val("");
        $("#clipboardYjdz").val("");
        $("#clipboardDhhm").val("");
        $("#clipboardLsh").val("");

        foldIdDiv(true);

        setTimeout(function () {
            form.render("select");
        }, 300);

    }


    function showManSubmit(bgbz) {
        //补证换证
        if (app.form.table1.ywlx1 == 5 || app.form.table1.ywlx1 == 6 || app.form.table1.ywlx1 == 7 || app.form.table1.ywlx1 == 13|| app.form.table1.ywlx1 == 67 || app.form.table1.ywlx1 == 613) {

            if (inSave) {
                return;
            }
            else {
                inSave = true;
                setTimeout(function () {
                    inSave = false;
                }, 10000);
            }
            layer.confirm("确定要保存吗?", {
                title: '提示'
            }, function () {


                app.form.table1.ywlxmc1 = "驾驶证-" + getValue(ywlxOptions, app.form.table1.ywlx1);
                var ywOption = getObject(ywlxOptions, app.form.table1.ywlx1);

                var msg = {};
                msg.form = app.form;
                msg.form.ywlx = ywOption.ywlx;
                msg.form.ywyy = ywOption.ywyy;


                msg.form.year = new Date().getFullYear();
                msg.form.month = new Date().getMonth() + 1;
                msg.form.day = new Date().getDate();
                msg.form.scry = scry;
                msg.form.scrymc = scrymc;
                msg.form.orgCode = orgCode;
                msg.form.userName = userName;
                msg.serviceType = app.serviceType;

                msg.form.imageData = [];
                msg.form.bgbz =bgbz;
                for (var i in app.imageData) {
                    msg.form.imageData.push({uuid: app.imageData[i].uuid});
                }
                msg.sfztp = app.sfztp;
                var data = {msg: JSON.stringify(msg)};

                layer.msg("保存中...");

                //alert(JSON.stringify(data).length);
                $.post("/cjg/bzhz", data, function (res) {
                    if (res.result == 'ok') {
                        var lsh = res.lsh;
                        app.lsh = res.lsh;
                        $("#resultLsh").val(lsh);
                        resultBoard = layer.open({
                            type: 1,
                            area: ['310px', '180px'],
                            title: '保存成功',
                            skin: 'layui-layer-demo', //样式类名
                            closeBtn: 1, //不显示关闭按钮
                            anim: 2,
                            shadeClose: false, //开启遮罩关闭
                            content: $("#resultBoard"),
                            end: function () {
                                $("#resultBoard").hide();
                                clearView("saveInfo");
                            }
                        });
                    }
                    else if (res.result == 'need_health') {
                        layer.alert(res.msg, {
                                closeBtn: 0,
                                anim: 4 //动画类型
                            },
                            function (e) {
                                layer.close(e);
                                showClipboard();
                            });

                    }
                    else {
                        layer.confirm(res.msg + '是否手工录入六合一流水单号。', {
                            // skin: 'layui-layer-lan',
                            btn: ['手工录入', '取消'],//按钮
                            anim: 4 //动画类型
                        }, function (e) {
                            layer.close(e);
                            showClipboard();
                        }, function (e) {
                            layer.close(e);
                        });
                    }
                });
            });
        }
        //修改驾驶证联系方式
        else if (app.form.table1.ywlx1 == 99) {
            layer.confirm("确定要保存吗?", {
                title: '提示'
            }, function (e) {
                layer.close(e);

                layer.msg("保存中,请稍等...");


                $.post("/cjg/xgjszlxfs", app.form.table1, function (res) {
                    if (res.retcode == '1') {
                        layer.alert("保存成功!", {
                                closeBtn: 0,
                                anim: 4 //动画类型
                            },
                            function (e) {
                                layer.close(e);
                                clearView("saveInfo");
                            });
                    }
                    else if (res.retdesc) {
                        layer.alert(res.retdesc, {
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                    else if (res.message) {
                        layer.alert(res.message, {
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                    else {
                        layer.alert('保存失败!', {
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                });
            });

        }
        else {
            showClipboard();
        }

    }

    function showCarSubmit() {





        if (app.form.table2.ywdl1 == 1 && (app.form.table2.ywlx1 == 2 || app.form.table2.ywlx1 == 3 || app.form.table2.ywlx1 == 4 || app.form.table2.ywlx1 == 5)) {


            var tips = '';

            if (app.form.table2.glbm != glbm) {
                tips = "所选车辆管理部门非本车管所，请谨慎操作。";
            }

            layer.confirm(tips + "确定要保存吗?", {
                title: '提示'
            }, function (e) {
                app.form.table2.ywlxmc1 = "机动车-" + getValue(jdcYwlxOptions, app.form.table2.ywlx1);
                var msg = {};
                msg.form = app.form;
                var ywlx = 'K';
                var ywyy = '';
                var sqyy = '';
                if (app.form.table2.ywlx1 == '2') {
                    ywyy = 'A';
                    if (app.form.table2.mxyy1 == '2') {
                        sqyy = 'A';
                    }
                    else {
                        sqyy = 'B';
                    }
                }
                else if (app.form.table2.ywlx1 == '3') {
                    ywyy = 'D';
                    sqyy = 'G';
                }
                else if (app.form.table2.ywlx1 == '4') {
                    ywyy = 'B';
                    if (app.form.table2.mxyy1 == '8') {
                        sqyy = 'A';
                    }
                    else {
                        sqyy = 'B';
                    }
                }
                else if (app.form.table2.ywlx1 == '5') {
                    ywyy = 'E';
                    sqyy = 'G';
                }


                msg.form.year = new Date().getFullYear();
                msg.form.month = new Date().getMonth() + 1;
                msg.form.day = new Date().getDate();
                msg.form.scry = scry;
                msg.form.scrymc = scrymc;
                msg.form.orgCode = orgCode;
                msg.form.userName = userName;
                msg.serviceType = app.serviceType;
                msg.form.ywlx = ywlx;
                msg.form.ywyy = ywyy;
                msg.form.sqyy = sqyy;


                msg.form.imageData = [];
                for (var i in app.imageData) {
                    msg.form.imageData.push({uuid: app.imageData[i].uuid});
                }
                msg.sfztp = app.sfztp;


                var data = {msg: JSON.stringify(msg)};

                layer.msg("保存中...");

                //alert(JSON.stringify(data).length);
                $.post("/cjg/bhlhpxsz", data, function (res) {
                    if (res.result == 'ok') {
                        var lsh = res.lsh;
                        app.lsh = res.lsh;
                        $("#resultLsh").val(lsh);
                        resultBoard = layer.open({
                            type: 1,
                            area: ['310px', '180px'],
                            title: '保存成功',
                            skin: 'layui-layer-demo', //样式类名
                            closeBtn: 1, //不显示关闭按钮
                            anim: 2,
                            shadeClose: false, //开启遮罩关闭
                            content: $("#resultBoard"),
                            end: function () {
                                $("#resultBoard").hide();
                                clearView("saveInfo");
                            }
                        });
                    }
                    else {
                        layer.alert(res.msg, {
                            // skin: 'layui-layer-lan',
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                });


            });

        }
        else if(app.form.table2.ywdl1==0)
        {

            var tips = '';

            if (app.form.table2.glbm != glbm) {
                tips = "所选车辆管理部门非本车管所，请谨慎操作。";
            }
            layer.confirm(tips + "确定要保存吗?", {
                title: '提示'
            }, function (e) {
                app.form.table2.ywlxmc1 = "机动车-" + getValue(jdcYwlxOptions, app.form.table2.ywlx1);
                var msg = {};
                msg.form = app.form;



                msg.form.year = new Date().getFullYear();
                msg.form.month = new Date().getMonth() + 1;
                msg.form.day = new Date().getDate();
                msg.form.scry = scry;
                msg.form.scrymc = scrymc;
                msg.form.orgCode = orgCode;
                msg.form.userName = userName;
                msg.serviceType = app.serviceType;



                msg.form.imageData = [];
                for (var i in app.imageData) {
                    msg.form.imageData.push({uuid: app.imageData[i].uuid});
                }
                msg.sfztp = app.sfztp;


                var data = {msg: JSON.stringify(msg)};

                layer.msg("保存中...");

                //alert(JSON.stringify(data).length);
                $.post("/cjg/lnmj", data, function (res) {
                    if (res.result == 'ok') {
                        var lsh = res.lsh;
                        $("#resultLsh").val(lsh);
                        resultBoard = layer.open({
                            type: 1,
                            area: ['310px', '180px'],
                            title: '保存成功',
                            skin: 'layui-layer-demo', //样式类名
                            closeBtn: 1, //不显示关闭按钮
                            anim: 2,
                            shadeClose: false, //开启遮罩关闭
                            content: $("#resultBoard"),
                            end: function () {
                                $("#resultBoard").hide();
                                clearView("saveInfo");
                            }
                        });
                    }
                    else {
                        layer.alert(res.msg, {
                            // skin: 'layui-layer-lan',
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                });
            });
        }
        else if (app.form.table2.ywdl1 == 9) {
            layer.confirm("确定要保存吗?", {
                title: '提示'
            }, function (e) {
                layer.close(e);

                layer.msg("保存中,请稍等...");


                $.post("/cjg/xgjdclxfs", app.form.table2, function (res) {
                    if (res.code == '1' && res.message == '成功') {
                        layer.alert("保存成功!", {
                                closeBtn: 0,
                                anim: 4 //动画类型
                            },
                            function (e) {
                                layer.close(e);
                                clearView("saveInfo");
                            });
                    }
                    else {
                        layer.confirm(res.msg + '是否手工录入六合一流水单号。', {
                            // skin: 'layui-layer-lan',
                            btn: ['手工录入', '取消'],//按钮
                            anim: 4 //动画类型
                        }, function (e) {
                            layer.close(e);
                            showClipboard();
                        }, function (e) {
                            layer.close(e);
                        });
                    }
                });
            });
        }
        else {
            showClipboard();
        }
    }


    var clipboard;
    var resultBoard;

    function showClipboard() {
        // app.form.table1.ywlxmc1 = "驾驶证-" + getValue(ywlxOptions, app.form.table1.ywlx1);
        if (app.form.currentInfo.type == 'man' || app.form.currentInfo.type == 'newMan') {
            if (!app.form.table1.ywlx1) {
                layer.msg("请先选择要办理的业务类型");
                return;
            }
            app.form.table1.ywlxmc1 = "驾驶证-" + getValue(ywlxOptions, app.form.table1.ywlx1);
            $("#clipboardYwlx").val("驾驶证-" + getValue(ywlxOptions, app.form.table1.ywlx1));
            $("#clipboardXm").val(app.sqr.xm);
            $("#clipboardSfzh").val(app.sqr.sfzmhm);
            $("#clipboardZz").val(app.sqr.address);
            $("#clipboardYjdz").val(app.form.table1.yjdz);
            $("#clipboardDhhm").val(app.form.table1.sjhm);
            $("#clipboardLsh").val("2"+new Date().format('yyMMdd'));
        }
        if (app.form.currentInfo.type == 'car' || app.form.currentInfo.type == 'newCar' || app.form.currentInfo.type == 'transferIn') {
            if (!app.form.table2.ywlx1) {
                layer.msg("请先选择要办理的业务类型");
                return;
            }
            app.form.table2.ywlxmc1 = "机动车-" + getValue(jdcYwlxOptions, app.form.table2.ywlx1);
            $("#clipboardYwlx").val("机动车-" + getValue(jdcYwlxOptions, app.form.table2.ywlx1));
            $("#clipboardXm").val(app.sqr.xm);
            $("#clipboardSfzh").val(app.sqr.sfzmhm);
            $("#clipboardZz").val(app.sqr.address);
            $("#clipboardCph").val(app.form.table2.hphm);
            $("#clipboardYjdh").val(app.form.table2.sjhm);
            $("#clipboardYjdz").val(app.form.table2.yjdz);
            $("#clipboardDhhm").val(app.form.table2.sjhm);
            $("#clipboardLsh").val("1"+new Date().format('yyMMdd'));

        }


        clipboard = layer.open({
            type: 1,
            area: ['1070px', '430px'],
            title: '剪切板',
            skin: 'layui-layer-demo', //样式类名
            closeBtn: 1, //不显示关闭按钮
            anim: 2,
            shadeClose: true, //开启遮罩关闭
            content: $("#clipboard"),
            end: function () {
                $("#clipboard").hide();
            }
        });

    }


    function hideClipboard() {
        layer.close(clipboard);
        $("#clipboard").hide();
    }

    function closeResulteBoard() {
        layer.close(resultBoard);
    }


    function doCopy(op) {
        op.select();
        document.execCommand("copy");
    }

    var scry;
    var scrymc;
    var orgCode;
    var userName;
    var xzqhShi;
    var glbm;

    var inSave = false;


    function saveInfo() {

        if (inSave) {
            return;
        }
        else {
            inSave = true;
            setTimeout(function () {
                inSave = false;
            }, 15000);
        }


        if (!$("#clipboardLsh").val() || $("#clipboardLsh").val().length != 13) {
            layer.msg("流水号格式不正确!");
            return;
        }
        else {
            app.form.table1.lsh = $("#clipboardLsh").val();
            app.form.table2.lsh = $("#clipboardLsh").val();

            app.lsh = $("#clipboardLsh").val();



        }
        var msg = {};
        msg.form = app.form;
        msg.form.year = new Date().getFullYear();
        msg.form.month = new Date().getMonth() + 1;
        msg.form.day = new Date().getDate();
        msg.form.scry = scry;
        msg.form.scrymc = scrymc;
        msg.form.orgCode = orgCode;
        msg.form.userName = userName;
        msg.serviceType = app.serviceType;

        msg.form.imageData = [];
        for (var i in app.imageData) {
            msg.form.imageData.push({uuid: app.imageData[i].uuid});
        }


        var data = {msg: JSON.stringify(msg)};
        layer.msg("保存中...");


        $.post("/cjg/bcsqjl", data, function (res) {
            if (res.result == 'ok') {
                layer.msg("保存成功!");
                clearView("saveInfo");
                layer.close(clipboard);
                setTimeout(function () {
                    foldIdDiv(false);
                }, 100);
            }
            else if (res.result == 'error') {
                layer.msg("流水号已存在,请勿重复保存!");
            }
        });


    }

    function refreshInfo() {

        //获取申请人驾驶证和车辆信息
        $.post("/cjg/getInfo", {idType: 1, idNumber: app.sqr.sfzmhm}, function (res) {
            app.form.manInfo = res.manInfo;
            app.form.carInfoList = res.carInfoList;
            app.form.newCarInfo = {
                type: 'newCar',
                value: 'newCar',
                zt: 'A'
            };
            app.form.transferCarInfo = {
                type: 'transferIn',
                value: 'transferIn',
                zt: 'A'
            };

            app.form.outerCarInfo = {
                type: 'outerCar',
                value: 'outerCar',
                zt: 'A'
            };

            if (res.manInfo != null && app.serviceType != 5) {
                app.selectInfo(app.form.manInfo)
                $.post("/cjg/tjxx", {sfzmhm: app.form.manInfo.sfzmhm}, function (res) {
                    if (res.sl == '1') {
                        app.form.ytjxx = true;
                        if (res.sfzmhm) {
                            app.form.tjxx = res;
                        }
                    }
                    else {
                        app.form.ytjxx = false;
                    }
                });
            }
            else {
                if (res.manInfo == null) {
                    app.form.newManInfo = {
                        type: 'newMan',
                        value: 'newMan',
                        zt: 'A'
                    };
                    app.form.transferInManInfo = {
                        type: 'transferInMan',
                        value: 'transferInMan',
                        zt: 'A'
                    };
                    app.form.transferInManInfo2 = {
                        type: 'transferInMan2',
                        value: 'transferInMan2',
                        zt: 'A'
                    };
                }
                if (app.form.carInfoList != null && app.form.carInfoList.length > 0) {
                    app.selectInfo(app.form.carInfoList[0]);
                }
                else {

                    if (app.serviceType == 5) {
                        showAddCarBoard();
                    }
                    else if (res.manInfo == null) {
                        app.selectInfo(app.form.newManInfo);
                    }
                    else {
                        app.selectInfo(res.manInfo);
                    }
                }
            }

            if (app.serviceType == 5) {
                $.post("/cjg/dybaList", {sfzmhm: app.dlr.sfzmhm}, function (res) {

                    if (res && res.length > 0) {
                        app.dybaList = res;
                        app.form.table2.ywdl1 = 4;
                        $("#jdcYwdl1").attr("disabled", true);
                        refreshSelect();
                    }
                    else {
                        layer.alert("无抵押备案信息！", {
                            closeBtn: 0,
                            anim: 4 //动画类型
                        });
                    }
                });
            }
            refreshSelect();

            $("div").scrollTop(0);
            setTimeout(function () {
                foldIdDiv(false);
            }, 2500);
        });
    }

    function changeView(viewId) {
        if (app.viewId && app.viewId == viewId) {
            return;
        }
        var data = {};
        var msg = {type: 'changeView', viewId: viewId};
        data = {msg: JSON.stringify(msg)};
        $.post("/cjg/postOut", data, function (res) {

        });
    }

    function passIdMatch(op) {

        if (op) {
            if (op == 'dlr') {
                if (app.dlrMatchFlag) {
                    return;
                }
            }
            if (op == 'sqr') {
                if (app.sqrMatchFlag) {
                    return;
                }
            }
        }


        if (!app.person) {
            return;
        }

        var data = {};
        var msg = {type: 'passIdMatch'};
        data = {msg: JSON.stringify(msg)};
        $.post("/cjg/postOut", data, function (res) {
            if (op) {
                if (op == 'dlr') {
                    app.dlrMatchFlag = true;
                    layer.msg("跳过代理人验证...");
                }
                if (op == 'sqr') {
                    app.sqrMatchFlag = true;
                    layer.msg("跳过申请人验证...");
                }
            }
            if (app.serviceType == 1) {
                app.form.table1.xm = app.sqr.xm;
                app.form.table1.xb = app.sqr.xb;
                app.form.table1.csrq = app.sqr.csrq;
                app.form.table1.gj = '中国';
                app.form.table1.sfzmhm1 = app.sqr.sfzmhm;
                app.form.table1.dlrDisplay = false;
                app.form.table2.xm = app.sqr.xm;
                refreshInfo();
            } else if (app.serviceType == 5) {
                if (app.idMatchFlag1) {
                    app.form.table2.xm = app.sqr.xm;
                    refreshInfo();
                }
                else {
                    app.idMatchFlag1 = true;
                }
            }
            else {
                app.form.table1.dlrDisplay = true;
                app.form.table1.dlrxm = app.dlr.xm;
                app.form.table1.dlrsfzmmc = 'A';
                app.form.table1.dlrsfzmhm = app.dlr.sfzmhm;
            }
        });
    }

    function sendSqrzp(sfzzp) {
        var data = {};
        var msg = {type: 'sfzzp', zp: sfzzp};
        data = {msg: JSON.stringify(msg)};
        $.post("/cjg/postOut", data, function (res) {

        });
    }


    var scanInitFlag = false;

    function showScanPad() {

        if (app.sqr == null) {
            layer.msg("当前无正在办理的业务")
            return;
        }


        layer.open({
            type: 1,
            area: ['835px', '810px'],
            title: '收集影像资料',
            skin: 'layui-layer-demo', //样式类名
            closeBtn: 1, //不显示关闭按钮
            anim: 2,
            shadeClose: true, //开启遮罩关闭
            content: $("#scanPad"),
            end: function () {
                $("#scanPad").hide();
            }
        });
        scanInitFlag = false;
        setTimeout(function () {
            startScan();
        }, 600);
    }


    function startScan() {

        app.scanMode = 3;
        captrue.bStopPlay();
        captrue.bStartPlay();
        captrue.bSetMode(3);

    }

    function startCam() {
        app.scanMode = 0;
        captrue.bSetMode(0)
        captrue.bStopPlay();
        captrue.bStartPlay2(0);
        captrue.bSetMode(0)
    }

    function startCard() {
        app.scanCount = 0;
        app.scanMode = 4;
        captrue.bStopPlay();
        captrue.bStartPlay();
        captrue.vSetDelHBFlag(1);
        captrue.bSetMode(4);
    }

    function guid() {
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
            var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
            return v.toString(16);
        });
    }

    function foldIdDiv(op) {
        if (op != null) {
            app.idFoldFlag = op;
        }
        if (app.idFoldFlag) {
            $("#sqr_div").show();
            $("#dlr_div").show();
            $("#null_div").show();
        }
        else {
            $("#sqr_div").hide();
            $("#dlr_div").hide();
            $("#null_div").hide();
        }
        app.idFoldFlag = !app.idFoldFlag;
        setTimeout(function () {
            onResize();
        }, 100);
    }


    function refreshSelect() {
        setTimeout(function () {
            form.render('select');
        }, 300);
    }


    var sfzBoard;

    function showSfzBoard() {
        //个人办理
        if ((app.serviceType == 1 && (app.sqr == null || app.sqr.sfzmhm == null))
            || (app.serviceType == 2 && (app.sqr == null || app.sqr.sfzmhm == null || app.dlr == null || app.dlr.sfzmhm == null))
            || (app.serviceType == 5 && (app.sqr == null || app.sqr.sfzmhm == null || app.dlr == null || app.dlr.sfzmhm == null))) {
            var title = '';

            if (app.serviceType == 1) {
                title = '手动输入申请人';
            }
            else if (app.serviceType == 2) {
                if (app.dlr == null || app.dlr.sfzmhm == null) {
                    title = '手动输入代理人';
                }
                else {
                    title = '手动输入申请人';
                }
            }
            else if (app.serviceType == 5) {
                if (app.sqr == null || app.sqr.sfzmhm == null) {
                    title = '手动输入申请人';
                }
                else {
                    title = '手动输入代理人';
                }
            }


            $("#inputSfz").val("");
            sfzBoard = layer.open({
                type: 1,
                area: ['330px', '180px'],
                title: title,
                skin: 'layui-layer-demo', //样式类名
                closeBtn: 1, //不显示关闭按钮
                anim: 2,
                shadeClose: false, //开启遮罩关闭
                content: $("#sfzBoard"),
                end: function () {
                    $("#sfzBoard").hide();
                }
            });
            return;
        }
        layer.msg("当前状态不可手动输入。");
    }


    var manualFlag = false;

    function querySfz() {

        pvsVerify($("#inputSfz").val(), '');
        if (app.serviceType == 1) {
            var sfzh = $("#inputSfz").val();
            app.sqr = {sfzmhm: sfzh};
            app.form.manualFlag = true;
            refreshInfo();
            layer.close(sfzBoard);
            changeView(30);
        }
        else if (app.serviceType == 2) {
            if (app.dlr == null || app.dlr.sfzmhm == null) {
                var sfzh = $("#inputSfz").val();
                app.dlr = {sfzmhm: sfzh};
                app.form.manualFlag = true;
                passIdMatch('dlr');
                layer.close(sfzBoard);
            }
            else {
                var sfzh = $("#inputSfz").val();
                app.sqr = {sfzmhm: sfzh};
                app.form.manualFlag = true;
                refreshInfo();
                layer.close(sfzBoard);
                changeView(30);
            }
        }
        else if (app.serviceType == 5) {
            if (app.sqr == null || app.sqr.sfzmhm == null) {
                var sfzh = $("#inputSfz").val();
                app.sqr = {sfzmhm: sfzh};
                app.form.manualFlag = true;
                passIdMatch('sqr');
                layer.close(sfzBoard);
            }
            else {
                var sfzh = $("#inputSfz").val();
                app.dlr = {sfzmhm: sfzh};
                app.form.manualFlag = true;
                refreshInfo();
                layer.close(sfzBoard);
                changeView(30);
            }
        }


    }


    var addCarBoard;

    function showAddCarBoard() {
        if ((app.serviceType == 5 && app.dlr != null && app.dlr.sfzmhm != null) || (app.serviceType && app.sqr && app.sqr.sfzmhm)) {
            $("#inputHphm").val("");
            $("#inputHpzl").val("");
            addCarBoard = layer.open({
                type: 1,
                area: ['330px', '260px'],
                title: '手动输入',
                skin: 'layui-layer-demo', //样式类名
                closeBtn: 1, //不显示关闭按钮
                anim: 2,
                shadeClose: false, //开启遮罩关闭
                content: $("#addCarBoard"),
                end: function () {
                    $("#addCarBoard").hide();
                }
            });
            refreshSelect();
            return;
        }
        layer.msg("当前状态不可手动输入。");
    }

    function addCar() {
        var hphm = $("#inputHphm").val();
        var hpzl = $("#inputHpzl").val();

        if (!hpzl) {
            layer.msg('请选择号牌种类!');
            return;
        }

        $.post("/cjg/carInfo", {hpzl: hpzl, hphm: hphm}, function (res) {
            if (res.clsbdh) {
                app.form.carInfoList.push(res);
                layer.close(addCarBoard);
            }
            else {
                layer.msg('未查询到车辆信息!');

            }
        });
    }

    function ParaSet_onclick() {
        var str = captrue.displayVideoPara();
    }

    function ParaSetPIN_onclick() {
        var str = captrue.vSetCapturePin();
        captrue.bStartPlay();
    }

    function pvsVerify(sfzmhm, xm) {
        // $.post('/pvs/verify', {sfzmhm: sfzmhm, xm: xm, scry: scry, scrymc: scrymc}, function (res) {
        //     var sdry = res.data.sdry;
        //     var skry = res.data.skry;
        //     var swry = res.data.swry;
        //     var xsfzqkry = res.data.xsfzqkry;
        //     var zdsfry = res.data.zdsfry;
        //     var zszhjsbry = res.data.zszhjsbry;
        //     var ztry = res.data.ztry;
        //
        //     if (sdry == 1 || skry == 1 || swry == 1 || xsfzqkry == 1 || zdsfry == 1 || zszhjsbry == 1 || ztry == 1) {
        //         var tips = "经验证，" + xm + "(身份证号:" + sfzmhm + ")为"
        //         if (sdry == 1) {
        //             tips += "涉毒人员，";
        //         }
        //         if (skry == 1) {
        //             tips += "涉恐人员，";
        //         }
        //         if (swry == 1) {
        //             tips += "涉稳人员，";
        //         }
        //         if (xsfzqkry == 1) {
        //             tips += "刑事犯罪前科人员，";
        //         }
        //         if (zdsfry == 1) {
        //             tips += "重点上访人员，";
        //         }
        //         if (zszhjsbry == 1) {
        //             tips += "肇事肇祸精神病人员，";
        //         }
        //         if (ztry == 1) {
        //             tips += "在逃人员，";
        //         }
        //
        //         tips += "请谨慎处理！";
        //         alert(tips);
        //
        //
        //     }
        //
        // })
    }


</script>
</body>
</html>
